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

RE: Test expression : Is Context Node an ancestor of n

Subject: RE: Test expression : Is Context Node an ancestor of node with Id!
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 19 Feb 2005 17:13:48 -0000
xsl test
> and it stop working. Isn't ancestor::Menu[1] and parent::Menu
> equivalent since the ancestor axis is going backward?

No, if the context node has a parent named X and X has a parent named Menu,
then ancestor::Menu[1] will select the grandparent, while parent::Menu won't
select anything.

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


> 
> Likewise, (ancestor::Menu)[1] should give the first ancestor in
> document order, that is to say the anciest ancestor of the context
> node.
> 
> Am i not correct? If so why my xsl stop working (or better, it works
> in a way i don't expect) after that change?
> 
> 
> On Sat, 19 Feb 2005 10:40:29 GMT, David Carlisle 
> <davidc@xxxxxxxxx> wrote:
> > 
> > Joris
> > 
> >  1)The union operater '|' works only for node-sets, not 
> boolean value. Use
> >  'or' here.
> > 
> > actually | works here as well, you have two node sets so either you
> > coerce them each to booleanand use or or you take their 
> union and then
> > coerce to a boolean, it comes to the same thing.
> > 
> > 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
> > 
> ______________________________________________________________
> __________

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.