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

Re : xsl:key not working on some machines and works on

Subject: Re : xsl:key not working on some machines and works on others
From: Leena Kulkarni <mulberrylist@xxxxxxxxxxx>
Date: Wed, 30 Jul 2003 07:06:30 +0100 (BST)
some keys not working
Im not sure it I will be able to post the xml and
xslts. I have one doubt which might get me closer to
the answer. what should be the context node where Im
using the key() function? can I use it at a node of
which the match attribute is a child of the context
node but the other nodes I want to test are not the
ones which I can get by a following-sibling axes.
something like this -

<Root>
  <Value>
     <ppp>keyValue</ppp>
  </Value>
  <Value>
     <ppp>keyValue</ppp>
  </Value>
  <Value>
     <ppp>keyValue</ppp>
  </Value>
  <Value>
     <ppp>keyValue</ppp>
  </Value>
</Root>

Here the key Im checking the uniqueness key. My code
is similar to -
<xsl:key name="Key" match="ppp" use="."/>
<xsl:for-each select="Value">
<xsl:if test="count(ppp | (key('Key', ppp)[1])) = 1">
</xsl:for-each>

If I do a for-each of Value and then test for the key
for ppp, will it give me unique values of ppp tag in
the document? 

Thanks and Regards,


________________________________________________________________________
Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.