xsl-list
[Top] [All Lists]

RE: weird key-nodeset behavior

2004-11-25 08:53:57
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(_at_)nag(_dot_)co(_dot_)uk]
Sent: Thursday, November 25, 2004 5:48 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] 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
________________________________________________________________________

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



<Prev in Thread] Current Thread [Next in Thread>