]> granicus.if.org Git - docbook-dsssl/commitdiff
(no commit message)
authorJirka Kosek <jirka@kosek.cz>
Mon, 21 Apr 2008 16:03:57 +0000 (16:03 +0000)
committerJirka Kosek <jirka@kosek.cz>
Mon, 21 Apr 2008 16:03:57 +0000 (16:03 +0000)
xsl/AUTHORS
xsl/common/common.xsl
xsl/fo/lists.xsl
xsl/html/lists.xsl

index 780effbb7853c91785c830ce33b414ce49a72fd7..9c3dcdc4b01d53a4dd7cdc4d320752e1027c91cb 100644 (file)
@@ -1,3 +1,4 @@
 The DocBook XSL stylesheets are maintained by Norman Walsh,
 <ndw@nwalsh.com>, and members of the DocBook Project,
 <docbook-developers@sf.net>
+
index d8a68b09e834f3c99a614468e295b69ac684766b..09c9d206f14c7ad4108346b46dc7a2fa7abc9b8a 100644 (file)
@@ -1414,6 +1414,44 @@ pointed to by the link is one of the elements listed in
   </xsl:choose>
 </xsl:template>
 
+<xsl:template match="orderedlist/listitem" mode="item-number">
+  <xsl:variable name="numeration">
+    <xsl:call-template name="list.numeration">
+      <xsl:with-param name="node" select="parent::orderedlist"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="type">
+    <xsl:choose>
+      <xsl:when test="$numeration='arabic'">1.</xsl:when>
+      <xsl:when test="$numeration='loweralpha'">a.</xsl:when>
+      <xsl:when test="$numeration='lowerroman'">i.</xsl:when>
+      <xsl:when test="$numeration='upperalpha'">A.</xsl:when>
+      <xsl:when test="$numeration='upperroman'">I.</xsl:when>
+      <!-- What!? This should never happen -->
+      <xsl:otherwise>
+        <xsl:message>
+          <xsl:text>Unexpected numeration: </xsl:text>
+          <xsl:value-of select="$numeration"/>
+        </xsl:message>
+        <xsl:value-of select="1."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="item-number">
+    <xsl:call-template name="orderedlist-item-number"/>
+  </xsl:variable>
+
+  <xsl:if test="parent::orderedlist/@inheritnum='inherit'
+                and ancestor::listitem[parent::orderedlist]">
+    <xsl:apply-templates select="ancestor::listitem[parent::orderedlist][1]"
+                         mode="item-number"/>
+  </xsl:if>
+
+  <xsl:number value="$item-number" format="{$type}"/>
+</xsl:template>
+
 <!-- ====================================================================== -->
 <!-- ItemizedList "Numeration" -->
 
index a5e8ca877967bc2126bb8f7a244957deb07dbc6d..4a54a74852cfc5849980139926750c409a4084f0 100644 (file)
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="orderedlist/listitem" mode="item-number">
-  <xsl:variable name="numeration">
-    <xsl:call-template name="list.numeration">
-      <xsl:with-param name="node" select="parent::orderedlist"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:choose>
-      <xsl:when test="$numeration='arabic'">1.</xsl:when>
-      <xsl:when test="$numeration='loweralpha'">a.</xsl:when>
-      <xsl:when test="$numeration='lowerroman'">i.</xsl:when>
-      <xsl:when test="$numeration='upperalpha'">A.</xsl:when>
-      <xsl:when test="$numeration='upperroman'">I.</xsl:when>
-      <!-- What!? This should never happen -->
-      <xsl:otherwise>
-        <xsl:message>
-          <xsl:text>Unexpected numeration: </xsl:text>
-          <xsl:value-of select="$numeration"/>
-        </xsl:message>
-        <xsl:value-of select="1."/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="item-number">
-    <xsl:call-template name="orderedlist-item-number"/>
-  </xsl:variable>
-
-  <xsl:if test="parent::orderedlist/@inheritnum='inherit'
-                and ancestor::listitem[parent::orderedlist]">
-    <xsl:apply-templates select="ancestor::listitem[parent::orderedlist][1]"
-                         mode="item-number"/>
-  </xsl:if>
-
-  <xsl:number value="$item-number" format="{$type}"/>
-</xsl:template>
-
 <xsl:template match="orderedlist/listitem">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
index 966d7c40751d534127d937461c4d9578641a6893..908bccee15b05a1bb561fa7e57d7b974b4ecc2f3 100644 (file)
                 |comment()[not(preceding-sibling::listitem)]
                 |processing-instruction()[not(preceding-sibling::listitem)]"/>
 
-    <ol>
-      <xsl:if test="$start != '1'">
-        <xsl:attribute name="start">
-          <xsl:value-of select="$start"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:if test="$numeration != ''">
-        <xsl:attribute name="type">
-          <xsl:value-of select="$type"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:if test="@spacing='compact'">
-        <xsl:attribute name="compact">
-          <xsl:value-of select="@spacing"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:apply-templates 
-            select="listitem
-                    |comment()[preceding-sibling::listitem]
-                    |processing-instruction()[preceding-sibling::listitem]"/>
-    </ol>
+    <xsl:choose>
+      <xsl:when test="@inheritnum='inherit' and ancestor::listitem[parent::orderedlist]">
+       <table border="0">
+         <col align="left" valign="top"/>
+          <tbody>
+           <xsl:apply-templates 
+               mode="orderedlist-table"
+               select="listitem
+                       |comment()[preceding-sibling::listitem]
+                       |processing-instruction()[preceding-sibling::listitem]"/>
+          </tbody>
+        </table>
+      </xsl:when>
+      <xsl:otherwise>
+       <ol>
+         <xsl:if test="$start != '1'">
+           <xsl:attribute name="start">
+             <xsl:value-of select="$start"/>
+           </xsl:attribute>
+         </xsl:if>
+         <xsl:if test="$numeration != ''">
+           <xsl:attribute name="type">
+             <xsl:value-of select="$type"/>
+           </xsl:attribute>
+         </xsl:if>
+         <xsl:if test="@spacing='compact'">
+           <xsl:attribute name="compact">
+             <xsl:value-of select="@spacing"/>
+           </xsl:attribute>
+         </xsl:if>
+         <xsl:apply-templates 
+               select="listitem
+                       |comment()[preceding-sibling::listitem]
+                       |processing-instruction()[preceding-sibling::listitem]"/>
+       </ol>
+      </xsl:otherwise>
+    </xsl:choose>
   </div>
 </xsl:template>
 
   </li>
 </xsl:template>
 
+<xsl:template match="orderedlist/listitem" mode="orderedlist-table">
+  <tr>
+    <td>
+      <xsl:apply-templates select="." mode="item-number"/>
+    </td>
+    <td>
+      <xsl:if test="local-name(child::*[1]) != 'para'">
+       <xsl:call-template name="anchor"/>
+      </xsl:if>
+
+      <xsl:choose>
+       <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+         <div class="{@revisionflag}">
+           <xsl:apply-templates/>
+         </div>
+       </xsl:when>
+       <xsl:otherwise>
+         <xsl:apply-templates/>
+       </xsl:otherwise>
+      </xsl:choose>
+    </td>
+  </tr>
+</xsl:template>
+
 <xsl:template match="variablelist">
   <xsl:variable name="pi-presentation">
     <xsl:call-template name="pi.dbhtml_list-presentation"/>