#399 Support a <?dbhtml stop-chunking?> PI

output: HTML
closed-fixed
nobody
XSL (399)
5
2010-03-03
2007-12-02
David Cramer
No

There needs to be a processing instruction that causes chunking to stop at that point and further.

Stopping chunking is the easy part:

Index: chunk-common.xsl

--- chunk-common.xsl (revision 6823)
+++ chunk-common.xsl (working copy)
@@ -924,6 +924,8 @@
-->

<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'

Getting the next and prev links to work is harder. Perhaps intervene wherever you check for the section depth: Instead of this (in the variable next-v1 and next-v2 in chunk-code.xsl):

|preceding::section[$chunk.section.depth &gt; count(ancestor::section)
and preceding-sibling::section
and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
This:

|preceding::section[$chunk.section.depth &gt; 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()]"/>

And so on and so forth for sect1-5 and the prevs and whatever else I'm forgetting at the moment :-) Question: would this affect fast-chunking? I don't know anything about it.

David

Discussion

  • David Cramer
    David Cramer
    2010-03-03

    implemented long ago.

     
  • David Cramer
    David Cramer
    2010-03-03

    • status: open --> open-fixed
     
  • David Cramer
    David Cramer
    2010-03-03

    • status: open-fixed --> closed-fixed
     
  • David Cramer
    David Cramer
    2010-03-03

    Marking closed.