xsl-list
[Top] [All Lists]

RE: [xsl] XPath - excluding specified childNodes from result nodeList

2007-12-15 02:12:14
I'm simply trying to exclude a specified child node from 
being within the nodeList created by my expression e.g.



<document>
<a>
     <b>
     </b>
     <c>
     </c>
</a>
</document>

Select node 'a' but remove child 'c' from the result set.

XPath expressions return a set of nodes from the original tree. They can't
modify the tree in any way. The <a> node in your document has a <c> child,
and there is nothing any XPath expression can do to change that. The
expression /document/a doesn't actually include either the b or c elements
in its result set, but the a that it returns is the original a, with its
children intact.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--