bug: node() only selects element children of the context node
Brought to you by:
bs_php,
nigelswinson
From: <gk...@pr...> - 2002-07-05 08:34:12
|
* @version 3.1 * @CVS $Id: XPath.class.php,v 1.99 2002/06/20 12:20:38 bs_php Exp $ */ 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 |