[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: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 20 Dec 2004 17:30:10 -0000
RE:  Comparing nodes in axis
When you use a node-set in a context where a boolean is expected, the answer
is false if the node-set is empty, true if it is non-empty.

In 2.0, see the rules for "effective boolean value".

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Antsnio Mota [mailto:xptm@xxxxxxx]
> Sent: 20 December 2004 17:06
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Comparing nodes in axis
>
> Altought i have allready structures like this,
> some-axis[true], i can?t quite
> comprehend it.
>
> In this case, how such statement should be translated to
> plain english?
>
> "Give me the ancestors that are menus of the current node if
> the current node is
> the same as the menu node at absolute position $pos"?
>
> What i can't comprehend is the use of true/false. Suppose i
> have a expression
> that has no term of comparation to the current node. How such
> a construct is
> feasible?
>
>
> Quoting Michael Kay <mike@xxxxxxxxxxxx>:
>
> > Or you could do
> >
> > xsl:variable name="P" select="(//menu)[$pos]"
> > xsl:if test="ancestor::menu[count(.|$P)=1]"
> >
> > Michael Kay
> > http://www.saxonica.com/
> >
> >
>
>
>
>
>
> 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.