[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Bib refs

Subject: Re: Bib refs
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Sat, 24 Feb 2001 09:25:02 +0000
Re:  Bib refs
David Carlisle wrote:
>   Then something like
>    <xsl:variable name="x" select="@doc"/>
>    <xsl:for-each select="$sorted-refs">
>      <xsl:value-of select="id($x)/../@number"/>
>    </xsl:for-each>
>
> This won't work as the id attribute isn't of type ID in the node sets in
> the variable. Could use a key or just
>  <xsl:value-of
> select="x:node-set($sorted-refs)/ref[*/@id=current()/@doc]/@number"/>

Or you can use the same principle as id() with keys instead because
you only have to define something in your stylesheet to use them. So
define the key:

<xsl:key name="refs" match="ref/*" use="@id" />

and then something like:

<xsl:variable name="x" select="@doc" />
<xsl:for-each select="$sorted-refs">
   <xsl:value-of select="key('refs', $x)/../@number" />
</xsl:for-each>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.