Can I do this with the Key function?

I'm using XSL to generate a PDF with FOP but I think this is more XSL 
than FO.

I have this in my XML file:
...
        <references>
            <reference n="[1]" t="some text"/>
        </references>
....
    <referenceLink t="some text"/>
....

My XSL file has this:
 ...
        <xsl:key name="references" match="reference" use="@t"/>
...
        <xsl:template match="referenceLink">
            <fo:wrapper font-style="italic">
                 <xsl:for-each select="key('references',@t)">
                    <fo:inline><xsl:text>reference 
</xsl:text><xsl:select value-of="@n"/></fo:inline>
                 </xsl:for-each>
            </fo:wrapper>
        </xsl:template>
...

What I want to have happen is the <referenceLink> tag to generate 
'reference [1]' . But it generates  just 'reference', ie it does not 
find the attribute @n on the <reference> tag. Reading the docs suggested 
to me that it would. What did I miss?

Thanks for any help.
Roger

Received on Friday, 20 July 2007 00:41:08 UTC