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 |
- Bib refs
- Peter Flynn - Fri, 23 Feb 2001 09:52:05 -0500 (EST)
- David Carlisle - Fri, 23 Feb 2001 10:40:49 -0500 (EST)
- David Carlisle - Fri, 23 Feb 2001 12:18:44 -0500 (EST)
- Jeni Tennison - Sun, 25 Feb 2001 03:13:04 -0500 (EST) <=
- <Possible follow-ups>
- Peter Flynn - Fri, 23 Feb 2001 11:46:47 -0500 (EST)
|
|