> How do I say: "for all nodes that are NOT H, X and Z, do this:" ?
In XSLT one doesn't need to specifically write this.
you will have two templates:
<xsl:template match="*">
<!-- Whatever general transformation necessary here -->
</xsl:template>
<xsl:template match="H | X | Z">
<!-- A more specialized transformation here -->
</xsl:template>
The second template overrides the first for elements of type H, X, Z.
Just try it :o)
Cheers,
Dimitre Novatchev
<Pi******@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hi,
I need to know how I can check to see if a particular node is NOT equal
to a SET of values.
i.e. a valid form of : <xsl:template match!="H" && match!="Y"&&
match!="Z">
I have an XML document of the foll format:
<ROOT>
<A>1</A>
<B>2</B>
<C>3</C>
....
<H>4</H>
...
</ROOT>
I need to transform this into another format. Only the nodes <H>, <X>,
<Z> need special handling, which i refer to, via a corresponding
template calls.
All the other nodes, need to be transformed like this:
<A>1</A> becomes <A><Value>1</Value></A>
My xsl looks something like this:
<xsl:template match="/">
<NEWFORM>
<xsl:apply-templates/>
</NEWFORM>
</xsl:template>
/****template calls for H, X, Z**********/
<xsl:template match="H">
//special handling for <H>
</xsl:template>
How do I say: "for all nodes that are NOT H, X and Z, do this:" ?
something like:
for each child of root
not equal to X, H, Z
do the following:
Thanks for any help
Rohit.