XML technologies / DocBook / Conditional elements (profiling) / Profiling methods / Single-step profiling
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
Single-step profiling eliminates the temporary document: profiling and transformation run in memory. Despite its convenience, keep the following in mind:
This method uses considerable memory. Internal profiling can cause memory problems with large documents. Use two-step profiling in that case.
You need an XSLT processor supporting the EXSLT function
exsl:node-set. If unavailable, use another XSLT processor providingexsl:node-setor use two-step profiling.The filtered document cannot be validated during this process. Ensure that it remains valid after profiling. Test the variants using the stylesheet
profiling/profile.xslto avoid unwanted results.
The following profiling stylesheets generate output in one step:
html/profile-docbook.xsl,xhtml/profile-docbook.xslgenerates a single (X)HTML file
html/profile-chunk.xsl,xhtml/profile-chunk.xslgenerates linked (X)HTML files (for more information, see Generating linked chunks)
fo/profile-docbook.xslgenerates a single XSL-FO file
The two steps required in the previous section can therefore be reduced to one, generating directly HTML:
xsltproc --output profiling-book-lin-001.html \
--stringparam profile.os "linux" \
DB/html/profile-docbook.xsl \
profiling-book-001.xml
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top