|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: back-referencing footnotes?
> BTW, xt doesn't seem to like keys(), or I'm doing it wrong.
the original xt didn't implement keys although I remember a project
starting up a while back to complete xt's support for xslt, but most xt
users have long since switched to saxon or xalan, I would guess.
If you have keys then it's just
<xsl:key name="h" match="*[@HREF]" use="@HREF"/>
...
<xsl:template match="FN">
<p>
<xsl:apply-templates select="key('h',@ID)"/>
<xsl:text> </xsl:text>
<xsl:apply-templates/>
</p>
</xsl:template>
If you have a DTD that declares the HREF attribute to be of type ID then
you can instead do
<xsl:template match="FN">
<p>
<xsl:apply-templates select="id(@ID)"/>
<xsl:text> </xsl:text>
<xsl:apply-templates/>
</p>
</xsl:template>
alternatively of course you can always replace a key or id function by
its equivalent if slower xpath
<xsl:template match="FN">
<p>
<xsl:apply-templates select="//FNR[@HREF=current()/@ID]"/>
<xsl:text> </xsl:text>
<xsl:apply-templates/>
</p>
</xsl:template>
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








