XML technologies / DITA / DITA Open Toolkit / XHTML and CSS
(Excerpt from “DITA – Der neue Standard für Technische Dokumentation” by Johannes Hentrich)
XHTML output from DITA XML is generated by the XSLT stylesheet dita2xhtml.xsl, located in directory xsl of the DITA Open Toolkit. File dita2xhtml.xsl includes these element-processing XSLT stylesheets:
dita2htmlImpl.xsl: processes most elements for XHTML output.rel-links.xsl: processes links and related links.taskdisplay.xsl: processes task-topic elements.refdisplay.xsl: processes reference elements.pr-d.xsl, hi-d.xsl, ut-d.xsl, ui-d.xsl, sw-d.xsl: process elements from the different domains.map2TOC.xsl, mapwalker.xsl: these two stylesheets generate the table of contents.
In Specialization we explained creating XSLT stylesheets for specialized elements. All XHTML stylesheet customization must follow that approach.
Besides XSLT, the DITA Open Toolkit provides two CSS files formatting the generated XHTML in browsers.
The CSS file
commonltr.cssin directoryresourceof the toolkit is for left-to-right text. The CSS filecommonrtl.cssin directoryresourceis for right-to-left text.
If XHTML is generated through an ANT build file, both CSS files are copied into the XHTML output directory.
CSS can be customized in two ways:
Override definitions in the existing CSS. First generate XHTML, then inspect its source to identify the CSS classes used.
Define new CSS as described in Specialization.
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