Table of contents

Abstract

Considerations in creating multiple page sequences

XML document structure and fo:page-sequences

The default XSL:FO approach

The XSL:FO solution

The default implementation in the DITA Open Toolkit: single page sequence

The solution in the DITA Open Toolkit: multiple page sequences

Conclusion

About the author

The default XSL:FO approach

Example 4 shows XSL templates that create a single page sequence. The output from this XSL is a set of hierarchically organized fo:blocks within the single page sequence. Notice the relationship of the <fo:page-sequence> element to the <xsl:apply-templates> element — one contained in the other.

These templates generate the output in Example 2, in which a single fo:page-sequence and fo:flow are wrapped around all the top-level section elements.

Example 4

<xsl:template match="/book">

   <fo:page-sequence>

     <fo:flow>

       <fo:block>

         <xsl:apply-templates select="section"/>

       </fo:block>

     </fo:flow>

   </fo:page-sequence>

</xsl:template>

<xsl:template match="section">

   <fo:block>

     <xsl:apply-templates/>

   </fo:block>

</xsl:template>

<xsl:template match="body">

   <fo:block>

     <xsl:apply-templates/>

   </fo:block>

</xsl:template>

 

Next Page:
The XSL:FO solution


Scriptorium Publishing | Post Office Box 12761 Research Triangle Park, NC 27709 | (919) 481 2701 | info@scriptorium.com