RE: [xsl] Match node() with exception

Subject: RE: [xsl] Match node() with exception
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 30 Aug 2004 22:08:20 +0100
> This is not working for me:
> 
> <xsl:apply-templates select="node()[not(/SchemaVersion)]"/>

This selects all the children nodes, unless the root node of the document
has a child called "SchemaVersion". A leading "/" always takes you up to the
root.
> 
> I have the node "SchemaVersion" which I care to NOT display.  

I think you want "node()[not(self::SchemaVersion)]"

Another alternative is to leave off the predicate, and define a template
rule for SchemaVersion that does nothing.

Michael Kay

Current Thread