]> granicus.if.org Git - docbook-dsssl/commitdiff
More hacking
authorNorman Walsh <ndw@nwalsh.com>
Tue, 4 Dec 2001 19:44:42 +0000 (19:44 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Tue, 4 Dec 2001 19:44:42 +0000 (19:44 +0000)
xsl/html/chunk-experimental.xsl

index f8fb9f3864566882fe293f6d7c8c0b14af326bd4..9c265f32838bc5440d23b841a58c610931145291 100644 (file)
@@ -3,6 +3,8 @@
                version="1.0"
                 exclude-result-prefixes="doc">
 
+<xsl:import href="docbook.xsl"/>
+
 <!-- ==================================================================== -->
 <!-- What's a chunk?
 
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="sect1
-                     |/section
-                     |section[local-name(parent::*) != 'section']">
+<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
   <xsl:choose>
-    <xsl:when test=". = /section">
+    <xsl:when test="$ischunk != 0">
       <xsl:call-template name="process-chunk"/>
     </xsl:when>
-    <xsl:when test="$chunk.sections = 0">
-      <xsl:apply-imports/>
-    </xsl:when>
-    <xsl:when test="ancestor::partintro">
-      <xsl:apply-imports/>
-    </xsl:when>
-    <xsl:when test="$chunk.first.sections = 0">
-      <xsl:choose>
-        <xsl:when test="count(preceding-sibling::section) &gt; 0
-                        or count(preceding-sibling::sect1) &gt; 0">
-          <xsl:call-template name="process-chunk"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-imports/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
     <xsl:otherwise>
-      <xsl:call-template name="process-chunk"/>
+      <xsl:apply-imports/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>