[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Error in XPath expression with IE
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|