|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: understanding key usage
Hi,
is there a difference between the following?
<xsl:key name="dkey" match="B" use="key"/>
<xsl:for-each select="value/B[generate-id()= generate-id(key('dkey','USD')[1])]">
and
<xsl:for-each select="value/dovizler[key='USD']">
in my opinion, both of these correspod to B elements whose 'key' values are equal to 'USD'.
any ideas?
regards.
They are very different. For example:
The first one selects B elements and the second one selects dovizler
elements.
The first one selects at most one node.
If there is a value child of the current node that has a B child, and
that B child is the first B element in the current document to have a
key with value USD then that B element is selected, otherwise the empty
set is returned.
The second one selects all dovizler children of value children of teh
currentnode that have a key child with value USD.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|
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








