← Prev in month ← Prev in thread

Customizing xref to a listitem

From
@ancy Crandt
Date
2009-11-11T15:33:47+00:00
ID
Thread
Customizing xref to a listitem
Hi folks,

I am trying to customize references to listitems as follows:

<xsl:template match="jlistref">
  <phrase status="print">
    <xref>
      <xsl:copy-of select="@*"/>
      <xsl:attribute name="linkend">
        <xsl:copy-of select="@*"/>
        <xsl:value-of select="@ref"/>
      </xsl:attribute>

      <xsl:attribute name="xrefstyle">
        <xsl:value-of select="'template:Step&#160;%n on page %p'"/>
      </xsl:attribute>
    </xref>
  </phrase>
  
  <phrase status="html">
    <xref>
      <xsl:copy-of select="@*"/>
      <xsl:attribute name="linkend">
        <xsl:copy-of select="@*"/>
        <xsl:value-of select="@ref"/>
     
 </xsl:attribute>

      <xsl:attribute name="xrefstyle">
        <xsl:value-of select="'template:Step&#160;%n'"/>
      </xsl:attribute>
    </xref>
  </phrase>
</xsl:template>

So that when I compile a PDF, an xref will look like as follows:

refer to Step <number> on page <number>.

In HTML, though, it must be just: Step <number>

However, the template above does not affect anything. The reference appears as default.

Please, advise!

Thanks a lot in advance!

Nancy
← Prev in month ← Prev in thread