1 <?xml version="1.0" encoding="ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook"
5 xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="cf exsl d">
7 <!-- ********************************************************************
9 This file is part of the XSL DocBook Stylesheet distribution.
10 See ../README or http://cdn.docbook.org/release/xsl/current/ for
11 copyright and other information.
13 ******************************************************************** -->
15 <!-- ==================================================================== -->
17 <xsl:import href="chunk.xsl"/>
18 <xsl:param name="chunk.fast" select="1"/>
20 <xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//cf:div"/>
22 <!-- ==================================================================== -->
24 <xsl:template name="process-chunk-element">
26 <xsl:when test="$chunk.fast != 0 and $exsl.node.set.available != 0">
27 <xsl:variable name="genid" select="generate-id()"/>
29 <xsl:variable name="div" select="$chunks[@id=$genid or @xml:id=$genid]"/>
31 <xsl:variable name="prevdiv" select="($div/preceding-sibling::cf:div|$div/preceding::cf:div|$div/parent::cf:div)[last()]"/>
32 <xsl:variable name="prev" select="key('genid', ($prevdiv/@id|$prevdiv/@xml:id)[1])"/>
34 <xsl:variable name="nextdiv" select="($div/following-sibling::cf:div|$div/following::cf:div|$div/cf:div)[1]"/>
35 <xsl:variable name="next" select="key('genid', ($nextdiv/@id|$nextdiv/@xml:id)[1])"/>
38 <xsl:when test="$onechunk != 0 and parent::*">
42 <xsl:call-template name="process-chunk">
43 <xsl:with-param name="prev" select="$prev"/>
44 <xsl:with-param name="next" select="$next"/>
51 <xsl:when test="$onechunk != 0 and not(parent::*)">
52 <xsl:call-template name="chunk-all-sections"/>
54 <xsl:when test="$onechunk != 0">
57 <xsl:when test="$chunk.first.sections = 0">
58 <xsl:call-template name="chunk-first-section-with-parent"/>
61 <xsl:call-template name="chunk-all-sections"/>