RE: [xsl] understanding key usage

Subject: RE: [xsl] understanding key usage
From: Osman Çınar Eren <Cinar.Eren@xxxxxxxxxxxxx>
Date: Mon, 22 Nov 2004 14:36:11 +0200
opss. sorry in the second one, dovizler would be B.

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Monday, November 22, 2004 2:35 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] understanding key usage


   is there a difference between the following?

   <xsl:key name="dkey" match="B" use="key"/>
     <xsl:for-each select="value/B[generate-id()=


   <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?

They are very different. For example:
The first one selects B elements and the second one selects dovizler

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.


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:

Current Thread