Two Ways to Use OASIS CALS. There are two ways in which the OASIS CALS table model can be used with the NLM Suite. The simplest way is to use the OASIS CALS table model instead of the XHTML table model. Replace the module for the XHTML table and its setup module with the module for the CALS table and its setup module, and 95% of the work is done. The second way — where a publisher or archive wishes to support both table models — is slightly more complicated.
Table Context. Tables are not used directly in the NLM Suite tag sets; they are embedded in larger structures. The element <table> is embedded in <table-wrap>, which contains the label, caption, table footer, etc. for the table. The element <tbody> (a part of the table) is used within <array>.
Whether the OASIS CALS table is to be added to an NLM tag set as the only table model or as an additional table model to a tag set that already contains the XHTML table tag set, the majority of the changes required in the NLM models and setup are very similar. However, if the two table models are used in one tag set, there will be namespace collisions; a practical solution is to add a namespace and namespace prefix to the OASIS elements. The discussion below assumes that this technique is the one chosen to integrate the OASIS table elements.
The following changes may need to be made to incorporate a new table model:
Classes are used to define where an element may be used. The class is defined as one or more elements, and then the class is used instead of the specific element names in content models. If only one table model is used in the tag set, it may not be necessary to change the default classes, but they should be checked to be sure.
Table Classes. The table element(s) are named in the %table.class; Parameter Entity and used in models and mixes as needed. In either the default-classes module or the DTD-specific class over-ride module, set %table.class; to one of the following values:
Tbody Classes. The <tbody> element is named in the %tbody.class; Parameter Entity and used in models and mixes as needed. In either the default-classes module or the DTD-specific class over-ride module, set %tbody.class; to one of the following values:
Other Classes and Models. Any given tag set may use the <table> and <tbody> elements in other classes and content models. Use global searches over your DTD modules (or the equivalent) to see if these elements are used anywhere else.
OASIS CALS Table Model Addition. To include the OASIS CALS table model in the tag set:
<!-- OASIS XML TABLE SETUP MODULE --> <!-- Set all Parameter Entities needed by the OASIS (CALS) Table Exchange table model, and then call the module containing that model. Authoring Note: If wanted, this module will be invoked in the DTD module --> <!ENTITY % oasis-tablesetup.ent PUBLIC "-//NLM//DTD Archiving and Interchange DTD Suite OASIS XML Table Setup Module v1.2 20040830//EN" "oasis-tablesetup.ent" > <!-- OASIS XML TABLE MODEL --> <!-- The OASIS (CALS) Table Exchange table model This module is invoked in %OASIStablesetup.ent; --> <!ENTITY % oasis-exchange.ent PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN" "oasis-exchange.ent" >
<!-- OASIS EXCHANGE (CALS) TABLE SETUP MODULE --> <!-- Set up the necessary Parameter Entity values and then invokes OASIS Exchange table module --> %oasis-tablesetup.ent;
XHTML Table Model Removal. Remember that it is possible to use both the XHTML and CALS models in the same tag set. But if the XHTML table model is not to be included in the DTD, perform the following:
<!-- XHTML TABLE SETUP MODULE --> <!-- Set all Parameter Entities needed by the HTML 4.0 (XHTML) table model, and then call the module containing that model. Authoring Note: If wanted, this module will be invoked in the DTD module --> <!ENTITY % XHTMLtablesetup.ent PUBLIC "-//NLM//DTD Archiving and Interchange DTD Suite XHTML Table Setup Module v2.3 20070202//EN" "XHTMLtablesetup.ent" > <!-- XHTML TABLE MODEL --> <!-- The public XML version of the XHTML 1.1 table model. This module is invoked in the module %XHTMLtablesetup.ent; --> <!ENTITY % xhtml-table-1.mod PUBLIC "-//W3C//ELEMENTS XHTML Tables 1.0//EN" "xhtml-table-1.mod" > <!-- XHTML TABLE INLINE STYLE MODULE --> <!-- The public XML version of the XHTML 1.1 inline style module for use in XHTML tables. This module is invoked in the module %XHTMLtablesetup.ent; --> <!ENTITY % xhtml-inlstyle-1.mod PUBLIC "-//W3C//ENTITIES XHTML Inline Style 1.0//EN" "xhtml-inlstyle-1.mod" >
<!-- XHTML TABLE SETUP MODULE --> <!-- Set up the necessary Parameter Entity values and then invoke XHTML (HTML 4.0) table module --> %XHTMLtablesetup.ent;
If two table models are to be used in one tag set, it is convenient to namespace one of them (see Pseudo Namespace below). The two OASIS modules have been set up assuming this namespacing. Hence, if only the OASIS table model is to be used, it will not be necessary to add a namespace or namespace prefix to the OASIS elements, and the instructions in Only OASIS: Removing the Prefix may be followed.
In order to use both the XHTML and OASIS CALS table models in the same tag set, it is necessary to give the OASIS elements a namespace, since there are known name collisions. (Actually either table model could be given a namespace, but since the XHTML is the default table model, the OASIS CALS model is considered the secondary model.) Since namespaces do not work well in the DTD world, this will require putting an actual prefix in front of each OASIS CALS table model element name as well as declaring the namespace and prefix. The element <table> will be named <oasis:table>, <tgroup> will be <oasis:tgroup>, etc.
To insert the namespace pseudo-attribute, add the following to the Article Attributes Parameter Entity (%article-atts;):
This namespace is declared in the OASIS Table Setup Module (%oasis-tablesetup.ent;) and should always be used on the <article> element.
If only one table model is to be used, it is not necessary to prefix the OASIS elements or to use the “xmlns” psuedo-attribute. If a tag set is built using only the OASIS model and not the XHTML model, the OASIS modules may be left intact. But a DTD designer will probably find it more convenient to make the following changes to the OASIS modules as delivered:
The OASIS Table Setup Module (%oasis-tablesetup.ent;) provides overrides to standard parameter entities used in the OASIS-Open exchange CALS table model and then invokes the OASIS-Open table exchange model module. This module should be read to ensure that no additional changes are needed.
Inside Table Cells. The %paracon; Parameter Entity sets up the content of a table cell (<entry>). This Parameter Entity, in turn, is set to the %inside-cell; Parameter Entity; consequently, the %inside-cell; Parameter Entity must be declared before the OASIS Table Setup Module is called. A default value for the Parameter Entity is established in the %default-mixes; module of the NLM Suite:
<!ENTITY % paracon "#PCDATA | %inside-cell;" >
NLM Added Attributes. The NLM Suite has added several attributes to the <table> element:
Other Changes. If you want to further customize the OASIS CALS table model, modifications should be added to the OASIS Table Setup Module (%oasis-tablesetup.ent;).