xsl-list
[Top] [All Lists]

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

2003-07-29 23:06:30
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



<Prev in Thread] Current Thread [Next in Thread>
  • Re : xsl:key not working on some machines and works on others, Leena Kulkarni <=