[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: understanding key usage

Subject: Re: understanding key usage
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 22 Nov 2004 12:34:43 GMT
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
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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