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

Re: Comparing nodes in axis

Subject: Re: Comparing nodes in axis
From: António Mota <xptm@xxxxxxx>
Date: Fri, 17 Dec 2004 19:46:20 +0000
Re:  Comparing nodes in axis
However, in my second example,

ancestor::menu = (//menu)[$pos]

i can not do

(count(ancestor::menu|(//menu)[$pos])=1)

but if my understanding of the union operator is correct, i can make

(count(ancestor::menu|(//menu)[$pos])=(count(ancestor::menu))

Right?


Citando xptm <xptm@xxxxxxx>:

> Michael Kay wrote:
>
> >You are comparing the nodes for equality, whereas your description
suggests
> >you want to compare them for identity. To compare whether $A and $B are
the
> >same node, use ($A is $B) in XPath 2.0, or (count($A|$B)=1) in XPath 1.0.
> >
> >
> >
> That's exactly what i want. In fact, testing for equality could lead to
> potencial errors, cause nothing in my structure forbids the existence of
> two nodes with the same content.
>
> A very large thank you...
>
>





O SAPO ja esta livre de vmrus com a Panda Software, fique vocj tambim!
Clique em: http://antivirus.sapo.pt

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.