This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: for-each attribute
- To: xsl-list at mulberrytech dot com
- Subject: Re: for-each attribute
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Wed, 27 Sep 2000 17:41:17 GMT
- References: <F259msfGdMNFmWAFsTm00006bc9@hotmail.com>
- Reply-To: xsl-list at mulberrytech dot com
> <inside-xsl-tag>
> <xsl:for-each select="in-tag/@*">
> <xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
> </xsl:for-each>
> </inside-xsl-tag>
> This works fine,
probably quicker (and safer if namespaces are involved) is just
<inside-xsl-tag>
<xsl:copy-of select="in-tag/@*">
</inside-xsl-tag>
><xsl:param name="it"/>
><inside-xsl-tag>
><xsl:for-each select="nodeset:nodeset($it)/in-xsl-tag/@*">
><xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
></xsl:for-each>
></inside-xsl-tag>
>Xalan complains about an illegal attributes as it tries to assign the
>attributes of <in-tag> to <xsl:for-each>
It looks OK, assuming "nodeset:nodeset() does what I think it does.
but perhaps just using copy-of as above will solve your problem
anyway?
Is your nodeset: namespace prefix correctly declared in your stylesheet?
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list