The DocBook XSL stylesheets are maintained by Norman Walsh,
<ndw@nwalsh.com>, and members of the DocBook Project,
<docbook-developers@sf.net>
+
</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" -->
</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>
|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"/>