XML technologies / DITA / Reusing information / Reusing information with DITA
(Excerpt from “DITA - Der neue Standard für Technische Dokumentation” by Johannes Hentrich)
Everything in DITA is oriented toward reuse. Its developers’ chief aim was maximum support at every level. Their difficulties with SGML at IBM prompted the search for a solution supporting several reuse levels.
DITA targets reuse of:
Content (content reuse)
Information structures (information design reuse)
Processing operations (processing reuse)
Information reuse often means content reuse alone. Although important, DITA also makes infrastructure reusable: DTDs, module files, XSLT transformations and XSLT stylesheets. Reusing DTDs and modules is particularly helpful for creating new structures such as topic or map types. The same applies to XSLT transformations and stylesheets.
Content
DITA reuses content through references. XML makes referencing elements and their content easy. The advantage is clear: referenced content needs creating only once. Revisions automatically update it everywhere it is referenced.
Content is referenced through maps and the mechanism conref. Reusing content with maps and conref introduces DITA’s reuse mechanisms.
Maps reference whole topics. A map is a table of contents specifying which topics, and thus content, enter a document. Assembly follows its requirements, for example by arranging topics for specific audiences or media.
A bookmap is a special map that also references topics but provides a framework for book-like organization, including placeholders for front matter, copyright and preface.
Topics can be referenced repeatedly in maps and bookmaps. Information needed in several manual locations simply gets several references. Topics are not bound to a map, so different maps can reuse them.
DITA’s second reuse method is the mechanism conref, referencing both individual topics and elements within them.
Content referenced through the mechanism conref is transcluded at the reference location. This replaces the element that references another through the mechanism conref. Transclusion is known from the HyTime (Hypermedia/Time-based Structuring Language) standard. Like HTML, HyTime is an SGML application; it became an ISO standard in 1992. Some concepts later entered HTML and XML.
Transclusion must not violate structural rules: the resulting XML document must validate against its DTD. Editors supporting the mechanism conref must check that replacement is allowed before performing it.
Referencing topics or elements requires identifying them uniquely with IDs. Topics always receive a unique ID, and all DITA-compliant editors verify that a topic has an ID. Elements, however, need not receive IDs; assigning IDs is optional. An ID is required only when an element is intended for later reference.
Assigning IDs, particularly to elements, entails administration. Define a naming scheme for IDs and make elements marked with an ID easy to access.
Using the mechanism conref therefore requires planning how elements marked with IDs and topics will be managed. Especially when several writers create reusable elements, efficient management systems are needed. Reusable elements are useless if writers do not know they exist or cannot find them.
Building such an environment always requires organization. This effort is often underestimated or ignored during adoption, with the result that DITA reuse mechanisms go unused and copy and paste returns.
Information structures
DITA can reuse not only content but also its own building blocks, notably its DTDs and module files.
As Flexible extensibility and especially Specialization show, DITA’s DTDs, module files and entity files define specialized structures. For a new topic type, copy an existing module, rename it and adapt it. No module or DTD need be developed from scratch. Similarly, existing module and entity
files define specialized maps or domains.
This works because specialized structures always have more restrictive content models than their originals. Truly new structures cannot result: topic DTDs cannot produce structures resembling DocBook.
This both simplifies and encourages new DTDs and modules. Reuse prevents DITA from becoming a rigid set extendable only with great effort, demonstrating again the power of reuse when applied correctly.
Structure reuse has limited value if existing stylesheets cannot process new types or new stylesheet development is expensive. DITA also offers a solution here.
Processing operations
Processing reuse distinguishes DITA from other standards. It includes not just DTDs and modules but the toolkit, whose stylesheets process specialized structures without modification. Specialization and DITA Open Toolkit give detailed information about DITA processing.
When stylesheet customization is necessary, it too can be reused. Customization mechanisms differ by output format, but reuse remains possible.
DITA thus reuses not just information but all its own elements, completing the reuse cycle.
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