> This is not in accordance with the xpath spec which says:
> http://www.w3.org/TR/1999/REC-xpath-19991116.html#location-paths
>
> child::* selects all element children of the context node
> child::text() selects all text node children of the context node
> child::node() selects all the children of the context node, whatever
> their node type
>
> Given any input, such as:
> <a>cdata<b>cdata</b></a>
>
> The following matches work fine:
> Xpath->match( "/*" ) - works fine
> Xpath->match( "/text()" ) - works fine
> Xpath->match( "/node()" ) - returns only the element children node
> set; same as /*
> should return same as: Xpath->match( "/* | /text()" ),
> which unfortunately also fails in phpXPath
Agreed. Bug. Many thanks for spotting this. I've added a test to the test
harness that demonstrates the bug, but it is as yet not fixed. :o)
Nigel
|