xsl-list
[Top] [All Lists]

Re: [xsl] "grouping" footnote numbers

2011-10-11 08:21:00
This should be relatively efficient:


<xsl:variable name="unique_hrefs" select="distinct-values(//xref/@href)"/>

 <xsl:template match="p">
    <xsl:element name="{local-name()}"><xsl:apply-templates/></xsl:element>
  </xsl:template>

  <xsl:template match="xref">
    <a href="{@href}">
      <sup>
                <xsl:value-of select="index-of($unique_hrefs, @href)"/>
      </sup>
    </a>
  </xsl:template>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>