XML technologies / DITA / Specialization / Generalization
(Excerpt from “DITA – Der neue Standard für Technische Dokumentation” by Johannes Hentrich)
Generalization restores specialized information structures to their original form. Attribute class is central because it records their structure and element mappings.
The procedure is the same for returning a specialized topic type or domain to its original or a parent structure. It has two steps:
An XSLT transformation outputs the attributes
classin the specialized XML document, ensuring specialized XSLT stylesheets can process it.A second XSLT transformation maps specialized elements to a parent information structure. Attribute
classcontains the element mappings.
This example generalizes an XML document created from the Support topic type back into a generic topic.
<?xml version="1.0"?>
<!DOCTYPE support SYSTEM "support.dtd">
<support>
<support-frage>Unter welchen Telefonnummern ist der Support erreichbar?
</support-frage>
<support-kurze-antwort>
<p>Unter der Nummer 12345 sind wir jederzeit für Sie da!</p>
</support-kurze-antwort>
<support-lange-antwort>
<p>Außerdem können Sie uns per E-Mail und per Fax erreichen</p>
</support-lange-antwort>
</support>An XSLT transformation can output all attributes class in the XML document:
<?xml version="1.0"?>
<!DOCTYPE support SYSTEM "support.dtd">
<support class="- topic/topic concept/concept support/support">
<support-frage class="- topic/title support/support-frage">Unter welchen Telefon nummern ist der Support erreichbar?</support-frage>
<support-kurze-antwort class= "- topic/shortdesc support/support-kurze-antwort">
<p class="- topic/p ">Unter der Nummer 12345 sind wir jederzeit für Sie da!</p>
</support-kurze-antwort>
<support-lange-antwort class= "- topic/body concept/conbody support/support-lange-antwort">
<p>Außerdem können Sie uns per E-Mail und per Fax erreichen</p>
</support-lange-antwort>
</support>A further transformation restores the original structure, including the specialized elements’ attributes class:
<?xml version="1.0"?>
<!DOCTYPE support SYSTEM "support.dtd">
<topic class="- topic/topic concept/concept support/support">
<title class="- topic/title support/support-frage">Unter welchen Telefon nummern ist der Support erreichbar?</title>
<shortdesc class= "- topic/shortdesc support/support-kurze-antwort">
<p class="- topic/p ">Unter der Nummer 12345 sind wir jederzeit für Sie da!</p>
</shortdesc>
<body class= "- topic/body concept/conbody support/support-lange-antwort">
<p>Außerdem können Sie uns per E-Mail und per Fax erreichen</p>
</body>
</topic>The generalized XML can still be processed with its specialized stylesheets, since all required information remains in attribute class.
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
back to top