XML technologies / DocBook / The DocBook XSL stylesheets / Partial transformation

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

When working on one chapter, transforming the entire book can be inconvenient. The DocBook stylesheets therefore let you process just one structural element from a document. These conditions must hold:

Keep these characteristics in mind:

The following example illustrates this:

<book>
  <preface ANKER="preface"> ... </preface>
  <chapter ANKER="intro"> ... </chapter>
  <chapter ANKER="xmlintro"> ... </chapter>
</book>

This document has a preface and two chapters. Their child elements are omitted for clarity. Each chapter and the preface have an anchor (id or xml:id). To select the complete chapter with the value xmlintro run xsltproc with this parameter:

xsltproc --stringparam rootid "xmlintro" ...

  

back to top