XML technologies / DITA / Creating and organizing topics / Content in topics: markup
(Excerpt from “DITA – Der neue Standard für Technische Dokumentation” by Johannes Hentrich)
Besides structural elements defining topic types, DITA provides numerous semantic and typographic markup elements, grouped into subject domains. DITA 1.1 has seven domains chiefly focused on software documentation. To broaden this one-sided coverage, numerous OASIS working groups now develop domains beyond software. For example, the DITA Machine Industry Specialization Subcommittee seeks to address mechanical engineering requirements.
The following discusses each domain and its semantic markup facilities in detail, concluding with typographic markup.
The programming domain
The programming domain marks programming-language syntax and code examples. Nested elements such as the element <parml> or the element <syntaxdiagram> contain further semantic markup elements.
The programming domain contains these elements:
<apiname>: marks an API class or method name (Application Programming Interface).<codeblock>: marks program code in a listing.<codeph>: marks inline code snippets.<delim>: marks a character delimiting code or a particular syntax.<fragment>: marks a subset of programming syntax.<fragref>: references a syntax fragment. Such references are recommended for frequently used syntax definitions.<groupseq>: marks groups of keywords (element<kwd>) and/or variables (element<var>) in a syntax diagram. Used inside the element<syntaxdiagram>.
<syntaxdiagram>
<groupseq>
<var>include-name</var>
<kwd>INCLUDE</kwd>
</groupseq>
</syntaxdiagram><groupchoice>: marks syntax parts requiring a user choice in a syntax diagram. Used inside the element<syntaxdiagram>.<groupcomp>: marks syntax parts that belong together and should be formatted accordingly.<kwd>: marks a keyword in a syntax diagram.<oper>: marks an operator.<option>: marks a possible command option.<parmname>: marks an API parameter.<parml>: marks a parameter list. Contains the elements<plentry>,<pt>and<pd>.
<parml>
<plentry>
<pt>n</pt>
<pd>First counter for loop.</pd>
</plentry>
<plentry>
<pt>m</pt>
<pd>Second counter for loop.</pd>
</plentry>
</parml><pd>: marks a parameter’s definition or description in a parameter list.<pt>: marks a parameter in a parameter list.<plentry>: contains the element<pt>and the element<pd>for marking parameters in a parameter list (element<paraml>).<repsep>: marks repeating elements in a syntax diagram.<sep>: marks a syntax separator.<synblk>: marks a syntax block.<synnote>: marks a remark in a syntax diagram. Used inside the element<syntaxdiagram>.<synnoteref>: references an element<synnote>already defined in a syntax diagram.<synph>: contains syntax-definition markup elements, such as the element<kwd>and the element<var>.
<synph>
<var>include-name</var>
<kwd>INCLUDE</kwd>
</synph><syntaxdiagram>: marks a syntax diagram. The element<syntaxdiagram>contains the elements<title>,<groupseq>,<groupcomp>,<groupchoice>,<fragref>,<fragment>,<repsep>, <synblk>,<synnote>and<synnoteref>.<var>: marks a variable in a syntax diagram.
The software domain
The software domain marks operations performed by a software program.
It contains these elements:
<cmdname>: marks a software command’s name.<filepath>: marks a file path.<msgblock>: marks the text of several program messages.<msgnum>: marks a program message’s number.<msgph>: marks a program message’s text.<systemoutput>: marks command output.<userinput>: marks user input controlling the program.<varname>: marks a variable name needed by the program.
The user interface domain
The user interface domain marks everything users can see in the interface, through these elements:
<menucascade>: marks a sequence of menu entries, each recorded in an element<uicontrol>.
<menucascade>
<uicontrol>Datei</uicontrol>
<uicontrol>Neu</uicontrol>
<uicontrol>Öffnen</uicontrol>
<uicontrol>Speichern</uicontrol>
<uicontrol>Schließen</uicontrol>
</menucascade><screen>: marks a textual representation of a screen, intended particularly for programs without a GUI (Graphical User Interface).<shortcut>: marks a key combination.<uicontrol>: marks GUI elements through which users operate the program.<wintitle>: marks window or dialog titles.
The utilities domain
The utilities domain defines an image map with linked regions. Image maps are familiar from HTML, but their DITA definition differs slightly.
The following example defines an image map in DITA:
<imagemap>
<image href="diagramm.jpg"></image>
<area>
<shape>poly</shape>
<coords>0,0,53,83</coords>
<xref href="area_1.xml"></xref>
</area>
<area>
<shape>poly</shape>
<coords>54,0,117,90</coords>
<xref href="area_2.xml"></xref>
</area>
<area>
<shape>poly</shape>
<coords>104,0,14,121</coords>
<xref href="area_3.xml"></xref>
</area>
</imagemap>The element <imagemap> defines the image map. Its graphic is specified in the element <image>.
The elements <area> define its individual regions.
The element <shape> specifies the region type. Possible values are rect (rectangle), circle (circle), poly (polygon) and default, covering the whole graphic.
The element <coords> supplies the linked regions’ coordinates. The origin is at the top left, and measurements are in pixels.
Finally, the element <xref> uses the attribute href for the target address opened when users click the linked region.
The xNAL domain
The xNAL domain uses a subset of Extensible
Name and Address Language elements for capturing address information in topics or maps.
It uses these elements:
<authorinformation>: a container that can hold the element<personinfo>and the element <organization>. These in turn hold further author or company information.
<authorinformation>
<personinfo>
...
</personinfo>
<organizationinfo>
...
</organizationinfo>
</authorinformation><addressdetails>: a container holding the elements<administrativearea>,<country>,<locality>and<thoroughfare> for address information.
<addressdetails>
<thoroughfare>Pflegerstraße 40</thoroughfare>
<locality>
<localityname>München</localityname>
<postalcode>81427</postalcode>
</locality>
<administrativearea>Bayern</administrativearea>
<country>Deutschland</country>
</addressdetails><administrativearea>: contains state or federal-state information.<contactnumber>: contains phone and fax information.<contactnumbers>: contains elements<contactnumer>.
<contactnumbers>
<contactnumer>089 98161590</contactnumber>
<contactnumber>089 81009233</contactnumer>
</contactnumbers><country>: contains the country name.<emailaddress>: contains an email address.<emailaddresses>: contains elements<emailaddress>.
<emailaddresses>
<emailaddress>jhentrich@xlcontent.de</emailaddress>
</emailddresses><firstname>: contains the first name.<generationidentifier>: contains generation information, such as Jr.<honorific>: contains the person’s title.<lastname>: contains the surname.<locality>: contains the element<localityname>and the element<postalcode>.
<locality>
<localityname>München</localityname>
<postalcode>81427</postalcode>
</locality><localityname>: contains the city name.<middlename>: contains the middle name.<namedetails>: contains the element<personname>and/or the element<organizationnamedetails>.<organizationinfo>: a container holding the elements<namedetails>,<addressdetails>,<contactnumbers>,<email-addresses> und <urls>.
<organizationinfo>
<namedetails>...</namedetails>
<addressdetails>...</addressdetails>
<contactnumbers>...</contactnumbers>
<emailaddresses>...</emailaddresses>
<urls>....</urls>
</organizationinfo> <organizationname>: contains a company or organization name.<organizationnamedetails>: a container holding the elements<organizationname>and<otherinfo>.
<organizationdetails>
<organizationname>XLcontent Verlag</organizationname>
<otherinfo>Verlag für Kommunikation und Technik</otherinfo>
</organizationdetails><otherinfo>: contains additional person or organization information.<personinfo>: a container holding the elements<namedetails>,<addressdetails>,<contactnumbers>and<email-addresses>.
<personinfo>
<namedetails>...</namedetails>
<addressdetails>...</addressdetails>
<contactnumbers>...</contactnumbers>
<emailaddresses>...</emailaddresses>
</personinfo><personname>: a container holding the elements<firstname>,<middlename>,<lastname>,<generationidentifier>and<otherinfo>.
<personname>
<firstname>Johannes</firstname>
<middlename></middlename>
<lastname>Hentrich</lastname>
<generationidentifier></generationidentifier>
<otherinfo>Autor</otherinfo>
</personname><postalcode>: contains the postal code.<thoroughfare>: contains street information.<url>: contains a URL.<urls>: contains elements<url>.
<urls>
<url>www.xlcontent-verlag.de</url>
</urls>Typographic markup
Typographic markup elements belong to the highlighting domain. Use them only when no semantic element suits the markup and the desired effect is purely visual.
The highlighting domain defines these elements:
<b>: makes content bold.<i>: makes content italic.<u>: underlines content.<tt>: uses a monospaced font such as Courier New.<sub>: makes content subscript.<sup>: makes content superscript.
Copyright © 2008 XLcontent Verlag
You may print the online version for your private use.
Otherwise, this chapter from “DITA - Der neue Standard für Technische Dokumentation” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
XLcontent Verlag, Pflegerstraße 40, 81247 München