</xsl:call-template>
</xsl:template>
-<xsl:template match="section|simplesect
- |sect1|sect2|sect3|sect4|sect5
- |refsect1|refsect2|refsect3
- |bridgehead"
- mode="object.xref.markup">
- <xsl:variable name="template">
- <xsl:apply-templates select="." mode="object.xref.template"/>
- </xsl:variable>
-
-<!--
- <xsl:message>
- <xsl:text>object.xref.markup: </xsl:text>
- <xsl:value-of select="local-name(.)"/>
- <xsl:text>: </xsl:text>
- <xsl:value-of select="$template"/>
- </xsl:message>
--->
-
- <xsl:call-template name="substitute-markup">
- <xsl:with-param name="template" select="$template"/>
- </xsl:call-template>
+<xsl:template match="listitem" mode="object.xref.markup">
+ <xsl:choose>
+ <xsl:when test="parent::orderedlist">
+ <xsl:variable name="template">
+ <xsl:apply-templates select="." mode="object.xref.template"/>
+ </xsl:variable>
+ <xsl:call-template name="substitute-markup">
+ <xsl:with-param name="template" select="$template"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Xref is only supported to listitems in an</xsl:text>
+ <xsl:text> orderedlist: </xsl:text>
+ <xsl:value-of select="@id"/>
+ </xsl:message>
+ <xsl:text>???</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- ============================================================ -->
</xsl:choose>
</xsl:template>
+<xsl:template match="orderedlist/listitem" mode="label.markup">
+ <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:number count="listitem" format="{$type}"/>
+</xsl:template>
+
<xsl:template match="abstract" mode="label.markup">
<!-- nop -->
</xsl:template>
<xsl:apply-templates select="." mode="object.xref.markup"/>
</xsl:template>
+<xsl:template match="listitem" mode="xref-to">
+ <xsl:apply-templates select="." mode="object.xref.markup"/>
+</xsl:template>
+
<xsl:template match="section|simplesect
|sect1|sect2|sect3|sect4|sect5
|refsect1|refsect2|refsect3" mode="xref-to">
<xsl:apply-templates select="." mode="number"/>
</xsl:template>
+<xsl:template match="varlistentry" mode="xref-to">
+ <xsl:apply-templates select="term[1]" mode="xref-to"/>
+</xsl:template>
+
+<xsl:template match="varlistentry/term" mode="xref-to">
+ <!-- to avoid the comma that will be generated if there are several terms -->
+ <xsl:apply-templates/>
+</xsl:template>
+
<xsl:template match="co" mode="xref-to">
<xsl:apply-templates select="." mode="callout-bug"/>
</xsl:template>
<xsl:apply-templates select="." mode="object.xref.markup"/>
</xsl:template>
+<xsl:template match="listitem" mode="xref-to">
+ <xsl:apply-templates select="." mode="object.xref.markup"/>
+</xsl:template>
+
<xsl:template match="section|simplesect
|sect1|sect2|sect3|sect4|sect5
|refsect1|refsect2|refsect3" mode="xref-to">
<xsl:apply-templates select="." mode="number"/>
</xsl:template>
+<xsl:template match="varlistentry" mode="xref-to">
+ <xsl:apply-templates select="term[1]" mode="xref-to"/>
+</xsl:template>
+
+<xsl:template match="varlistentry/term" mode="xref-to">
+ <!-- to avoid the comma that will be generated if there are several terms -->
+ <xsl:apply-templates/>
+</xsl:template>
+
<xsl:template match="co" mode="xref-to">
<xsl:apply-templates select="." mode="callout-bug"/>
</xsl:template>