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

RE: Error in XPath expression with IE

Subject: RE: Error in XPath expression with IE
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Tue, 15 Mar 2005 16:31:32 -0000
xpath browser support
> 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

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.