Subject: RE: Are nodes atomic values?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 9 Sep 2005 23:24:23 +0100
|
> 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/
|