Tempore 17:52:11, die Thursday 27 January 2005 AD, hinc in foro {comp.text.xml} scripsit <>:
> <a>
> <b>
> <c>one</c>
> <c>three</c>
>
> <d>
> <e>one</e>
> <e>three</e>
> <e>five</e>
> </d>
> </a>
>
> what i want to find are all the e nodes that don't have a matching c
> node (five in this case). any pointers would be most appreciated!
Hi,
A short, but CPU unfriendly method is this:
<xsl:template match="a">
<xsl:apply-templates select=".//e[not(.=//c)]"/>
</xsl:template>
A key approach could be used for better performance:
<xsl:key name="node" match="c" use="."/>
<xsl:template match="a">
<xsl:apply-templates select=".//e[not(key('node',.))]"/>
</xsl:template>
regards,
--
Joris Gillis (
http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Laudeo W3C et dona ferens