|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: using document() function in match attribute of xs
On Thu, 10 May 2001, Mike McGraw wrote:
[...]
> <xsl:key name="people" match="document('people.xml')/data/person"
> use="@size"/>
>
> and then later in the stylesheet, to display a list of all people who wear
> medium size shirts, I would do this:
>
> <xsl:for-each select="key('people','M')">
> <xsl:value-of select="."/><br/>
> </xsl:for-each>
I believe the correct way is:
<xsl:key name="people" match="/data/person" use="@size"/>
...
<xsl:for-each select="document('people.xml')"> <!-- change context -->
<xsl:for-each select="key('people', 'M')">
<xsl:value-of select="."/><br/>
</xsl:for-each>
</xsl:for-each>
(I did not test this, I might be wrong...)
--Swen
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








