[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

Subject: Re: using document() function in match attribute of xsl:keyelement- possible?
From: "Swen Thuemmler" <Swen.Thuemmler@xxxxxxxxxxxx>
Date: Thu, 10 May 2001 18:54:03 +0200 (MET DST)
people match
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/>

(I did not test this, I might be wrong...)


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

Current Thread


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.
First Name
Last Name
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.