Required DTD changes
Publication Manager works with all DTDs however, some changes must be made to the DTD before you can use Publication Manager as a map editor.
Changes needed to the DTD
The DTD must be extended with a number of default attributes. The default attributes do not affect your XML.
The following elements must be changed in your DTD:
- Container elements: for example, section element, chapter elements, etc.
- Link elements: for example,
<xref>,<topicref>,<link>, etc.
Container elements
A container element is an element that contains a set of other elements. These container elements can be visualized in the map editor.
For each container element following default attributes must be defined in the DTD
| Attribute | Default value | Description |
|---|---|---|
ishtype | ISHSection | The value ISHSection indicates that the element will be displayed as an item in the tree. |
ishlabelxpath | XPath expression | Indicates the label for the item in the tree. |
Consider following example in which we defined the <chapter> element as a container element. The <chapter> element will be displayed in the tree view of the Publication Explorer. Whenever an XML document is loaded containing a <chapter> element, the content of the <title> element (first child element) is displayed in the tree (indicated by the XPath expression ./title)
<!ELEMENT chapter
( title, ( section | module-ref )* ) >
<!ATTLIST chapter
ishtype CDATA #FIXED "ISHSection"
ishlabelxpath CDATA #FIXED "./title"
>
Following example gives you an idea on how to display a container element inside the tree view of the Publication Explorer when nothing inside your XML document can be used as a label that can be displayed inside the tree.
<!ELEMENT foofoo
( module-ref )* ) >
<!ATTLIST foofoo
ishtype CDATA #FIXED "ISHSection"
ishfoofoo CDATA #FIXED "foofoo container element"
ishlabelxpath CDATA #FIXED "@ishfoofoo"
>
In this case, the label "foofoo container element" will be displayed in the tree view of the Publication Explorer whenever a <foofoo> element is encountered inside your XML document.
Link elements
| Attribute | Default value | Description |
|---|---|---|
ishtype | ISHModule | The value |
ishlinkxpath | XPath expression | Indicates how the referencing value must be found. |
Following example defines that the <module-ref> element must be interpreted as a link towards a topic. The value of the “href” attribute will be used for retrieving the content of the topic from the repository whenever this item is selected in the tree view of the repository.
<!ELEMENT module-ref EMPTY>
<!ATTLIST module-ref
href CDATA #IMPLIED
ishtype CDATA #FIXED "ISHModule"
ishlinkxpath CDATA #FIXED "@href"
>