This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: for-each attribute



> <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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]