[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl]
[xsl]
Subject: [xsl] <xsl:attribute issue
From: Vaduvoiu Tiberiu <vaduvoiutibi@xxxxxxxxx>
Date: Wed, 16 May 2007 04:02:57 -0700 (PDT)
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
Current Thread
- [xsl] <xsl:attribute issue
- Vaduvoiu Tiberiu - Wed, 16 May 2007 04:02:57 -0700 (PDT) <=
- Abel Braaksma - Wed, 16 May 2007 13:59:22 +0200
- Michael Kay - Wed, 16 May 2007 13:31:42 +0100
<- Previous Index Next ->
Re: [xsl] Way to terminate the xslt, Dimitre Novatchev
Thread
Re: [xsl] <xsl:attribute issue, Abel Braaksma
Re: [xsl] Calling a java method in , Kai Hackemesser
Date
[xsl] Formatting string, Babu Eswaramoorthy
Month
Keywords
Subject: [xsl] <xsl:attribute issue From: Vaduvoiu Tiberiu <vaduvoiutibi@xxxxxxxxx> Date: Wed, 16 May 2007 04:02:57 -0700 (PDT) |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Way to terminate the xslt, Dimitre Novatchev | Thread | Re: [xsl] <xsl:attribute issue, Abel Braaksma |
Re: [xsl] Calling a java method in , Kai Hackemesser | Date | [xsl] Formatting string, Babu Eswaramoorthy |
Month |
Keywords