xsl-list
[Top] [All Lists]

RE: Are nodes atomic values?

2005-09-09 15:24:23
My question is, is there a XPath that selects a node such as i get the
same as if i did a

<xsl:copy>
   <xsl:apply-templates select="*[not(SomeNode)]"/>
</xsl:copy>

or with a example, giving this node

<Menu>
   <Name>aaa</Name>
   <SomeNode>xxx</SomeNode>
</Menu>

is there a XPath expr that selects only

<Menu>
   <Name>aaa</Name>
</Menu>


Your source document doesn't have a Menu element with one child, so the only
way the result can contain a Menu element with one child is by creating a
new node or modifying an existing one. XPath never creates or modifies
nodes, so the answer is no.

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>
--~--



<Prev in Thread] Current Thread [Next in Thread>