[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

for-each attribute

Subject: for-each attribute
From: "xsl list" <xsl_list@xxxxxxxxxxx>
Date: Wed, 27 Sep 2000 10:43:14 EDT
xsl for each attribute
Can anuone, please, explain the difference between the following two cases:
1)
<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, the attributes of <in-tag> are assigned to <inside-xsl-tag>

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


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

Thanks,
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at http://profiles.msn.com.


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.