add support for crossreferences in legi2odf

This commit is contained in:
Frédéric Péters 2011-09-28 13:32:21 +02:00
parent 5617e0d96c
commit edbebc8a09
1 changed files with 10 additions and 1 deletions

View File

@ -93,6 +93,7 @@
<xsl:when test="$par = 'preface'">
<text:p text:style-name="TitrePreface"><xsl:value-of select="."/></text:p>
</xsl:when>
<xsl:when test="$par = 'table'"></xsl:when> <!-- ignoring legend, it's handled in match="table" -->
<xsl:otherwise>
<text:h><xsl:attribute name="text:style">
<xsl:choose>
@ -207,7 +208,11 @@
<text:span text:style-name="TS{@role}"><xsl:apply-templates select="node() | text()" mode="inline"/></text:span>
</xsl:template>
<xsl:template match="xref" mode="inline">
<text:sequence-ref text:reference-format="value"><xsl:attribute name="text:ref-name"
><xsl:value-of select="@linkend"/></xsl:attribute>1</text:sequence-ref>
</xsl:template>
<xsl:template match="informaltable">
<xsl:element name="table:table">
<xsl:attribute name="table:name"></xsl:attribute>
@ -229,6 +234,10 @@
<xsl:if test="not($tabletitle='')">
<xsl:element name="text:p">
<xsl:attribute name="text:style-name">Table</xsl:attribute>
Tableau
<text:sequence text:name="Table" text:formula="ooow:Table+1"
style:num-format="1"><xsl:attribute
name="text:ref-name"><xsl:value-of select="title/@id"/></xsl:attribute>1</text:sequence>:
<xsl:value-of select="$tabletitle"/>
</xsl:element>
</xsl:if>