xml - How to concatenate parameters in XPath and return the result -


i have 2 parameters in xml document parse out , concatenate together.

for example, have have following 2 parameters:

<param name="param1" type="string">     <xsl:value-of select="//tr:a/tr:b/c/d/e/f/g/h"/> </param>         <param name="param2" type="string">     <xsl:value-of select="//tr:a/tr:b/c/d/e/f/g/i"/> </param> 

how can concatenate values of param1 , param2 single string , display output?

in xpath (as per question title), use concat():

concat($param1, $param2) 

in xslt (per question code example), take xsl:value-of above xpath:

<xsl:value-of select="concat($param1, param2)"/> 

regarding "and display output:" xpath selects , has no separate notion of display; xslt transforms have xsl:message write logs.


Comments