<a>
<xsl:attribute name="href">
<xsl:value-of select="/*/properties/property[@name='report']/@value" />
</xsl:attribute>
</a>
Is there any way to cancat another string to
<xsl:value-of select="/*/properties/property[@name='report']/@value" />
I need to pass some text to href attribute in addition to the report property value
Three Answers :
Simple :
Using 'concat' :
Attribute shortcut as suggested by @TimC
Use:
You can use the rather sensibly named xpath function called concat here
Of course, it doesn't have to be text here, it can be another xpath expression to select an element or attribute. And you can have any number of arguments in the concat expression.
Do note, you can make use of Attribute Value Templates (represented by the curly braces) here to simplify your expression
Easiest method is
when the XML Structure is
The easiest way to concat a static text string to a selected value is to use element.