•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 363,502 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,341 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser:
Views: 601 | Replies: 1 | Solved
![]() |
•
•
Join Date: May 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
hi,
i'm really a newbie in xslt. i try to add string to a variable using concat (there is some how my xslt processor doesn't know string-join, but that's not the point here =P)
this is some part of xml code
this is some part of xslt code
if everything works fine, the result will be
/01/02/
i also try recursive concat using xsl:template, but that make me even more confuse
Sitting and coding from 12 to 7pm, still couldn't understand why this doesn't work.
anyone pls help me. my assignment deadline is coming real soon. T-T
i'm really a newbie in xslt. i try to add string to a variable using concat (there is some how my xslt processor doesn't know string-join, but that's not the point here =P)
this is some part of xml code
xml Syntax (Toggle Plain Text)
<node0> <node1> <node1name>xxxx</node1name> <node2> <node3>01</node3> </node2> <node2> <node3>02</node3> </node2> </node1> <node1> <node1name>yyyy</node1name> <node2> <node3>03</node3> </node2> </node1> <node1> <node1name>zzzz</node1name> <node2> <node3>04</node3> </node2> </node1> </node0>
this is some part of xslt code
xslt Syntax (Toggle Plain Text)
<!-- i select $copareName before and test it already. its value is 'xxxx' --> <xsl:variable name="strTest" select="''" /> <xsl:for-each select="//node2[parent::node()/node1name=$copareName]"> <xsl:variable name="tmp" select="node3" /> <xsl:variable name="strTest" select="concat($strTest, '/', $tmp)" /> </xsl:for-each> <xsl:variable name="strTest" select="concat($strTest, '/')" /> <xsl:value-of select="strTest" /><!-- the result from this line is nothing. -->
if everything works fine, the result will be
/01/02/
i also try recursive concat using xsl:template, but that make me even more confuse

Sitting and coding from 12 to 7pm, still couldn't understand why this doesn't work.
anyone pls help me. my assignment deadline is coming real soon. T-T
Last edited by micksatana : May 7th, 2008 at 5:59 am.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb XML, XSLT and XPATH Marketplace
Similar Threads
- error C2059: syntax error : 'namespace' (C++)
- I lack focus... (Java)
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: XML to XML make all elements attributes
- Next Thread: validate xml using xsd


Linear Mode