W3C home > Mailing lists > Public > www-xsl-fo@w3.org > July 2007

Can I do this with the Key function?

From: Roger Parkinson <roger@senanque.co.nz>
Date: Fri, 20 Jul 2007 12:41:30 +1200
Message-ID: <46A004BA.8010304@senanque.co.nz>
To: www-xsl-fo@w3.org

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:
            <reference n="[1]" t="some text"/>
    <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)">
</xsl:text><xsl:select value-of="@n"/></fo:inline>

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.
Received on Friday, 20 July 2007 00:41:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:31 UTC