Re: node() only selects element children of the context node
Brought to you by:
bs_php,
nigelswinson
From: Nigel S. <nig...@us...> - 2002-07-11 02:00:44
|
This is now fixed in the version in CVS. :o) > 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 > > - Greg |