Hi, I am trying to create an attribute for one of my xml files that has a
typoical format like:
<root>
<level1>
<name>Name1</name>
other tags
</level1>
<level1>
<name>Name2</name>
other tags
</level1>
</root>
so I'm trying to set the attribute of the name element before displaying it:
<xsl:for-each select=level1>
<xsl:variable ....{here I get a variable so that's why I can't call
directly for each level1/name>
<xsl:for-each select="name">
<xsl:attribute name="test">
<xsl:value-of select="4"/>(just for testing, instead of 4 I have a
variable but I put 4 for testing)
</xsl:attribute>
<xsl:for-each>
</xsl:for-each>
and then if I try to display it using
<xsl:for-each select="level1/name">
<xsl:value-of select="@test"/>
</xsl:for-each>,
it doesn't display anything.
So where exactly am I going wrong? 10x in advance
____________________________________________________________________________________Get
the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--