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

RE: Key to select all same nodes(same @id) except curr

Subject: RE: Key to select all same nodes(same @id) except current node
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 8 Mar 2007 00:23:22 -0000
RE:  Key to select all same nodes(same @id) except curr
Well, guessing usually doesn't work with XPath. It has its own way of doing
things.

You want $parentvar/ancestor::*[2]

or $parentVar/../..

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

> -----Original Message-----
> From: Tech Guru [mailto:tech_gr@xxxxxxxxx] 
> Sent: 07 March 2007 19:43
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  Key to select all same nodes(same @id) 
> except current node
> 
> I want to select grand parent of node denoted by variable 
> $parentvar, thats why I thought "ancestor::$parentvar[2]". 
> 
> -R
> 
> ----- Original Message ----
> From: Michael Kay <mike@xxxxxxxxxxxx>
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Sent: Wednesday, March 7, 2007 2:36:34 PM
> Subject: RE:  Key to select all same nodes(same @id) 
> except current node
> 
> > Could you please tell me what is wrong in xpath 
> > "ancestor::$parentvar[2]" . It gives error saying it is not a valid 
> > xpath.
> 
> Well, that's what's wrong with it - it isn't a valid XPath. 
> You made up the syntax, and I've no idea what you thought it 
> might mean. The thing after the "::" should be a node test, 
> which says what kind of nodes you want to select, e.g. "foo" 
> to select foo elements, or "*" to select all elements.
> 
> Perhaps you meant $parentvar/ancestor::*[2]? I've no idea, I 
> can only guess.
> 
> Michael Kay
> http://www.saxonica.com/
> 
> 
> 
> 
> 
> 
>  
> ______________________________________________________________
> ______________________
> It's here! Your new message!  
> Get new email alerts with the free Yahoo! Toolbar.
> http://tools.search.yahoo.com/toolbar/features/mail/

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.