[xsl] Identity Transformations revisited

Subject: [xsl] Identity Transformations revisited
From: "Karl J. Stubsjoen" <karl@xxxxxxxxxxxxx>
Date: Sat, 6 Mar 2004 10:39:08 -0700
Hello,

Previously I had asked the question on how to identity transform the a XML
that has been passed in as a parameter.  There was some mixed conclusions
whether you could or could not.  For sure, I can treat this parameter as XML
and as a result tree.

Why can't I set up a for-each... and transform on each node and attribute of
the result tree?  Maybe I can not push an apply-templates... but I should be
able to implicitly step through the source.

So I have this:

     <xsl:apply-templates select="$c"/>


A correct template match is made here:
<xsl:template match="campaign">
    <xsl:copy>
     <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
</xsl:template>

(the above doesn't seem to work...)
but couldn't I:
<xsl:template match="campaign">
    <xsl:for-each select="*">
     <xsl:copy-of select="."/>
    </xsl:for-each
</xsl:template>

(but this is where I am not sure how to appropriately write the for-each..)
Any help would be appreciated.

Karl


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


Current Thread