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

RE: weird key-nodeset behavior

Subject: RE: weird key-nodeset behavior
From: Osman Çınar Eren <Cinar.Eren@xxxxxxxxxxxxx>
Date: Thu, 25 Nov 2004 17:53:57 +0200
xsl key nodeset
i forgot to tell;
<xsl:for-each select="$mydovizler>
brings all of the elements('dovizler') in $mydovizler. all i want is to group
this nodeset according the key values of these elements.
So,
1) the key definition works because of the first thing i wrote in the previous
mail.
2) $mydovizler is full with elements as they are listed as specified above.
3) the key definition does not work for the nodeset.


should i give the input file?(xml and xsl)
regards.




-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Thursday, November 25, 2004 5:48 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  weird key-nodeset behavior



  -if i try to group on all elements with the key definition, it works, e.g.:
  <xsl:for-each select="//dovizler[generate-id(.) =
generate-id(key('dkey',key)[1])]">
  -but if i try to do the grouping on a nodeset, it does not work, e.g.:
  <xsl:for-each select="$mydovizler[generate-id(.) =
  generate-id(key('dkey',key)[1])]"> where $mydovizler is a nodeset
  composed of 'dovizler' elements.

The first is also doing grouping on a nodeset, the nodeset selected by
//dovizler


$mydovizler[generate-id(.) =  generate-id(key('dkey',key)[1])]"

selects those nodes in $mydovizler that have the property that they are
the first node with their key value value in the whole document.

So if there is some key value for which the first node is not in this
set then no nodes with thatkey will be selected.

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.