opss. sorry in the second one, dovizler would be B.
-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Sent: Monday, November 22, 2004 2:35 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] 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
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--