xsl-list
[Top] [All Lists]

Re: [xsl] Key to select all same nodes(same @id) except current node

2007-03-07 12:43:43
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(_at_)saxonica(_dot_)com>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Sent: Wednesday, March 7, 2007 2:36:34 PM
Subject: RE: [xsl] 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/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--






 
____________________________________________________________________________________
It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--