Concating string to Xpath Exprn.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Muthu08
    New Member
    • Sep 2007
    • 9

    Concating string to Xpath Exprn.

    <xsl:variable name= "xpath">
    <xsl:for-each select="ancesto r::*">
    <xsl:value-of select="name()"/><xsl:text>-</xsl:text>
    </xsl:for-each>
    <xsl:value-of select="name()"/>
    </xsl:variable>


    Hi ,
    The above code generates the Xpath exprn from the root node.NBUt I would like to concat a string like "AAA" to the genarated Xpath ..So the Xpath wouls be like AAA: root/node1/.......etc
    How do I do this.

    Thanks.
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Just put AAA before the for-each loop.
    Or, use <xsl:text>AAA </xsl:text>

    Comment

    Working...