xsl-list
[Top] [All Lists]

RE: Error in XPath expression with IE

2005-03-15 09:31:32


Maybe this is a little of-topic, but i have this problem 
where the expression

(//Menu)[1]ancestor-or-self::Menu/MenuTitulo

gives a error on some IE browsers 

That is because it's missing a '/' after the predicate:

(//Menu)[1]/ancestor-or-self::Menu/MenuTitulo
          ^^^

[snip]

Can i write this XPATH expression withou the use of the axis?

The Xpath itself isn't very good because (//Menu)[1] selects the first
<Menu> element of all <Menu> elements in the whole document, returning
at most a single node.  The ancestor-or-self::Menu axis on that node
will only ever return that same node back, so:

(//Menu)[1]/ancestor-or-self::Menu/MenuTitulo

Is the same as:

(//Menu)[1]/MenuTitulo

cheers
andrew

--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>