[xsl] Omitting node within For-Each in Merge

Subject: [xsl] Omitting node within For-Each in Merge
From: JCS <subscriber@xxxxxxxxxxxxx>
Date: Mon, 08 Dec 2003 14:59:56 +1300
Hi everyone,

The answer to this problem may be as simple as finding my sunglasses perched
on my head, but I'm having trouble dealing with a simple concept. I've
looked in the archives and around the net but have come up blank.

I'm merging two documents and matching a common element with a variable. But
how do I exclude or omit redundant data?

My XML document A:

My XML document B:


Output desired:


My current XSL:

<xsl:variable name="merge" select="document('merge.xml')"/>

<xsl:template match="/">

    <xsl:for-each select="//level/level">
        <xsl:variable name="level">
            <xsl:value-of select="text()"/>
        <xsl:copy-of select="../child::*"/>
        <xsl:copy-of select="$merge//row[Level=$level]/*"/>

Because I'm asking it to select all the children of <row> I get the <level>
element output again, I want to omit this. Is there a special way to
filter/omit nodes without suppressing the output with templates? i.e.
Specify to select all children nodes EXCEPT <level>? This is where I get
stuck for some reason.


/johnny :)

"If you're going through hell, keep going."

Winston Churchill 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread