JasonHampson
Technical User
I have a XSL template I’m creating and I want to insert a link to another web page. The name of the page is obtained from returning a value from an XML node.
I have tried both:
<xsl:template match="SUB_HEADING">
<A href="{concat(value-of select='MODULE',' - ',value-of select='HEADING','(',value-of select='ID',')','#',value-of select='TITLE','(',value-of select='ID',')')}"><H3>Sub Heading:- <xsl:value-of select="HEADING"/></H3></A>
</xsl:template>
which returns the function as a string and not something that is executed
and:
<xsl:template match="SUB_HEADING">
<A href=<xsl:value-of select="MODULE"/> - <xsl:value-of select="HEADING"/>(<xsl:value-of select="ID"/>)#<xsl:value-of select="HEADING"/>(<xsl:value-of select="ID"/>)><H3>Sub Heading:- <xsl:value-of select="HEADING"/></H3></A>
</xsl:template>
which gave an error saying a string literal was expected
If I put the above example in speech marks the error says I can’t use ‘<’ in an attribute.
Could anyone tell me how to solve my little problem
I have tried both:
<xsl:template match="SUB_HEADING">
<A href="{concat(value-of select='MODULE',' - ',value-of select='HEADING','(',value-of select='ID',')','#',value-of select='TITLE','(',value-of select='ID',')')}"><H3>Sub Heading:- <xsl:value-of select="HEADING"/></H3></A>
</xsl:template>
which returns the function as a string and not something that is executed
and:
<xsl:template match="SUB_HEADING">
<A href=<xsl:value-of select="MODULE"/> - <xsl:value-of select="HEADING"/>(<xsl:value-of select="ID"/>)#<xsl:value-of select="HEADING"/>(<xsl:value-of select="ID"/>)><H3>Sub Heading:- <xsl:value-of select="HEADING"/></H3></A>
</xsl:template>
which gave an error saying a string literal was expected
If I put the above example in speech marks the error says I can’t use ‘<’ in an attribute.
Could anyone tell me how to solve my little problem