http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6063 -->
<xsl:variable name="prev-v1"
- select="(ancestor::sect1[$chunk.section.depth > 0
+ select="(ancestor::sect1[$chunk.section.depth > 0
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect1][1]
|ancestor::sect2[$chunk.section.depth > 1
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect2
and parent::sect1[preceding-sibling::sect1]][1]
|ancestor::sect3[$chunk.section.depth > 2
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect3
and parent::sect2[preceding-sibling::sect2]
and ancestor::sect1[preceding-sibling::sect1]][1]
|ancestor::sect4[$chunk.section.depth > 3
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect4
and parent::sect3[preceding-sibling::sect3]
and ancestor::sect2[preceding-sibling::sect2]
and ancestor::sect1[preceding-sibling::sect1]][1]
|ancestor::sect5[$chunk.section.depth > 4
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect5
and parent::sect4[preceding-sibling::sect4]
and ancestor::sect3[preceding-sibling::sect3]
and ancestor::sect1[preceding-sibling::sect1]][1]
|ancestor::section[$chunk.section.depth > count(ancestor::section)
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
<xsl:variable name="prev-v2"
select="(preceding::sect1[$chunk.section.depth > 0
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect1][1]
|preceding::sect2[$chunk.section.depth > 1
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect2
and parent::sect1[preceding-sibling::sect1]][1]
|preceding::sect3[$chunk.section.depth > 2
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect3
and parent::sect2[preceding-sibling::sect2]
and ancestor::sect1[preceding-sibling::sect1]][1]
|preceding::sect4[$chunk.section.depth > 3
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect4
and parent::sect3[preceding-sibling::sect3]
and ancestor::sect2[preceding-sibling::sect2]
and ancestor::sect1[preceding-sibling::sect1]][1]
|preceding::sect5[$chunk.section.depth > 4
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect5
and parent::sect4[preceding-sibling::sect4]
and ancestor::sect3[preceding-sibling::sect3]
and ancestor::sect1[preceding-sibling::sect1]][1]
|preceding::section[$chunk.section.depth > count(ancestor::section)
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::section
and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
<xsl:variable name="next-v1"
select="(following::sect1[$chunk.section.depth > 0
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect1][1]
|following::sect2[$chunk.section.depth > 1
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect2
and parent::sect1[preceding-sibling::sect1]][1]
|following::sect3[$chunk.section.depth > 2
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect3
and parent::sect2[preceding-sibling::sect2]
and ancestor::sect1[preceding-sibling::sect1]][1]
|following::sect4[$chunk.section.depth > 3
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect4
and parent::sect3[preceding-sibling::sect3]
and ancestor::sect2[preceding-sibling::sect2]
and ancestor::sect1[preceding-sibling::sect1]][1]
|following::sect5[$chunk.section.depth > 4
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect5
and parent::sect4[preceding-sibling::sect4]
and ancestor::sect3[preceding-sibling::sect3]
and ancestor::sect1[preceding-sibling::sect1]][1]
|following::section[$chunk.section.depth > count(ancestor::section)
- and preceding-sibling::section
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
+ and preceding-sibling::section
and not(ancestor::section[not(preceding-sibling::section)])][1])[1]"/>
<xsl:variable name="next-v2"
select="(descendant::sect1[$chunk.section.depth > 0
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect1][1]
|descendant::sect2[$chunk.section.depth > 1
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect2
and parent::sect1[preceding-sibling::sect1]][1]
|descendant::sect3[$chunk.section.depth > 2
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect3
and parent::sect2[preceding-sibling::sect2]
and ancestor::sect1[preceding-sibling::sect1]][1]
|descendant::sect4[$chunk.section.depth > 3
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect4
and parent::sect3[preceding-sibling::sect3]
and ancestor::sect2[preceding-sibling::sect2]
and ancestor::sect1[preceding-sibling::sect1]][1]
|descendant::sect5[$chunk.section.depth > 4
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::sect5
and parent::sect4[preceding-sibling::sect4]
and ancestor::sect3[preceding-sibling::sect3]
and ancestor::sect1[preceding-sibling::sect1]][1]
|descendant::section[$chunk.section.depth > count(ancestor::section)
+ and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
and preceding-sibling::section
and not(ancestor::section[not(preceding-sibling::section)])])[1]"/>
</xsl:param>
<xsl:variable name="prev-v1"
- select="(preceding::sect1[$chunk.section.depth > 0][1]
- |preceding::sect2[$chunk.section.depth > 1][1]
- |preceding::sect3[$chunk.section.depth > 2][1]
- |preceding::sect4[$chunk.section.depth > 3][1]
- |preceding::sect5[$chunk.section.depth > 4][1]
- |preceding::section[$chunk.section.depth > count(ancestor::section)][1])[last()]"/>
+ select="(preceding::sect1[$chunk.section.depth > 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |preceding::sect2[$chunk.section.depth > 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |preceding::sect3[$chunk.section.depth > 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |preceding::sect4[$chunk.section.depth > 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |preceding::sect5[$chunk.section.depth > 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |preceding::section[$chunk.section.depth > count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[last()]"/>
<xsl:variable name="prev-v2"
- select="(ancestor::sect1[$chunk.section.depth > 0][1]
- |ancestor::sect2[$chunk.section.depth > 1][1]
- |ancestor::sect3[$chunk.section.depth > 2][1]
- |ancestor::sect4[$chunk.section.depth > 3][1]
- |ancestor::sect5[$chunk.section.depth > 4][1]
- |ancestor::section[$chunk.section.depth > count(ancestor::section)][1])[last()]"/>
+ select="(ancestor::sect1[$chunk.section.depth > 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |ancestor::sect2[$chunk.section.depth > 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |ancestor::sect3[$chunk.section.depth > 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |ancestor::sect4[$chunk.section.depth > 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |ancestor::sect5[$chunk.section.depth > 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |ancestor::section[$chunk.section.depth > count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[last()]"/>
<xsl:variable name="prev"
select="(preceding::book[1]
|$prev-v2)[last()]"/>
<xsl:variable name="next-v1"
- select="(following::sect1[$chunk.section.depth > 0][1]
- |following::sect2[$chunk.section.depth > 1][1]
- |following::sect3[$chunk.section.depth > 2][1]
- |following::sect4[$chunk.section.depth > 3][1]
- |following::sect5[$chunk.section.depth > 4][1]
- |following::section[$chunk.section.depth > count(ancestor::section)][1])[1]"/>
+ select="(following::sect1[$chunk.section.depth > 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |following::sect2[$chunk.section.depth > 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |following::sect3[$chunk.section.depth > 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |following::sect4[$chunk.section.depth > 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |following::sect5[$chunk.section.depth > 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |following::section[$chunk.section.depth > count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[1]"/>
<xsl:variable name="next-v2"
- select="(descendant::sect1[$chunk.section.depth > 0][1]
- |descendant::sect2[$chunk.section.depth > 1][1]
- |descendant::sect3[$chunk.section.depth > 2][1]
- |descendant::sect4[$chunk.section.depth > 3][1]
- |descendant::sect5[$chunk.section.depth > 4][1]
+ select="(descendant::sect1[$chunk.section.depth > 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |descendant::sect2[$chunk.section.depth > 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |descendant::sect3[$chunk.section.depth > 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |descendant::sect4[$chunk.section.depth > 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+ |descendant::sect5[$chunk.section.depth > 4and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
|descendant::section[$chunk.section.depth
- > count(ancestor::section)][1])[1]"/>
+ > count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[1]"/>
<xsl:variable name="next"
select="(following::book[1]
-->
<xsl:choose>
+ <xsl:when test="$node/parent::*/processing-instruction('dbhtml')[normalize-space(.) = 'stop-chunking']">0</xsl:when>
<xsl:when test="not($node/parent::*)">1</xsl:when>
<xsl:when test="local-name($node) = 'sect1'