Closed haysclark closed 10 years ago
From peterj...@gmail.com on April 11, 2009 09:37:00
The spec seems to lean towards * <==> : but it's not 100% clear. I am going to check against other implementation first.
From peterj...@gmail.com on April 11, 2009 14:40:12
Of other implementations that I found quickly online all of them treat "*" as meaning "any localName and any namespace".
I used the expression "/channel/title" in an rss document, that uses the rdf namespace in the root node, and all returned the correct node: http://www.mizar.dk/XPath/Default.aspx http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm http://ponderer.org/download/xpath/ http://www.zrinity.com/developers/xml/xpath/xpath.cfm (no support in the online tool for using namespaces, but "/[local-name()='channel']/[local-name()='title']" worked)
So... I've fixed this and it will be in the next release.
Status: Fixed
From peterj...@gmail.com on April 11, 2009 09:35:21
The W3C XPath 1.0 Spec says:
A node test * is true for any node of the principal node type.
And it has examples like:
"@* selects all the attributes of the context node" "/para selects all para grandchildren of the context node" "attribute:: will select all attributes of the context node"
This suggests that * should actually be a synonym for :.
In the current implementation, * will only match a node if:
Original issue: http://code.google.com/p/xpath-as3/issues/detail?id=19