]> granicus.if.org Git - docbook-dsssl/commitdiff
Support dbhtml/dbfo start PI for orderedlist numbering in both HTML and FO
authorNorman Walsh <ndw@nwalsh.com>
Thu, 4 May 2006 12:28:02 +0000 (12:28 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Thu, 4 May 2006 12:28:02 +0000 (12:28 +0000)
xsl/common/common.xsl
xsl/html/lists.xsl

index b97f2acc6e1cefc7cd26a626cba664588d94b5d7..e95ce09b2df75137603ecf20f55ac00b6e292d6c 100644 (file)
@@ -1326,8 +1326,36 @@ pointed to by the link is one of the elements listed in
 
 <xsl:template name="orderedlist-starting-number">
   <xsl:param name="list" select="."/>
+
+  <!-- Need a neutral dbxxx -->
+  <xsl:variable name="pi-html-start">
+    <xsl:call-template name="pi-attribute">
+      <xsl:with-param name="pis"
+                      select="$list/processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'start'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="pi-fo-start">
+    <xsl:call-template name="pi-attribute">
+      <xsl:with-param name="pis"
+                      select="$list/processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'start'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
   <xsl:choose>
-    <xsl:when test="not($list/@continuation = 'continues')">1</xsl:when>
+    <xsl:when test="not($list/@continuation = 'continues')">
+      <xsl:choose>
+       <xsl:when test="$pi-html-start != ''">
+         <xsl:value-of select="$pi-html-start"/>
+       </xsl:when>
+       <xsl:when test="$pi-fo-start != ''">
+         <xsl:value-of select="$pi-fo-start"/>
+       </xsl:when>
+       <xsl:otherwise>1</xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
     <xsl:otherwise>
       <xsl:variable name="prevlist"
                     select="$list/preceding::orderedlist[1]"/>
index 2181b1058e0b64c88cb45351c74a796457ad86a2..5eb134766feddf16c16e611eb138798b02d62f92 100644 (file)
 </xsl:template>
 
 <xsl:template match="orderedlist">
-  <xsl:variable name="pi-start">
-    <xsl:call-template name="dbhtml-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbhtml')"/>
-      <xsl:with-param name="attribute" select="'start'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
   <xsl:variable name="start">
-    <xsl:choose>
-      <xsl:when test="@continuation='continues'">
-        <xsl:call-template name="orderedlist-starting-number"/>
-      </xsl:when>
-      <xsl:when test="$pi-start != ''">
-        <xsl:value-of select="$pi-start"/>
-      </xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
+    <xsl:call-template name="orderedlist-starting-number"/>
   </xsl:variable>
 
   <xsl:variable name="numeration">