for-each attribute

Subject: for-each attribute
From: "xsl list" <xsl_list@xxxxxxxxxxx>
Date: Wed, 27 Sep 2000 10:43:14 EDT
Can anuone, please, explain the difference between the following two cases:
<xsl:for-each select="in-tag/@*">
<xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
This works fine, the attributes of <in-tag> are assigned to <inside-xsl-tag>

<xsl:param name="it"/>
<xsl:for-each select="nodeset:nodeset($it)/in-xsl-tag/@*">
<xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
Xalan complains about an illegal attributes as it tries to assign the attributes of <in-tag> to <xsl:for-each>

What is the difference in both cases? I am using case (1) to assign the attributes of tags in the XML to tags generated using the XSL. I would like to be able to use case (2), where within the XSL I can pass an element param (<xsl:with-param name="it"><in-xsl-tag a="1"/></xsl:with-param>).

Get Your Private, Free E-mail from MSN Hotmail at

Share information about yourself, create your own public profile at

XSL-List info and archive:

Current Thread