XSLT function parameter from xsl:value-of select



I want to substring a particular sentence in XSLT so I use below function and it works fine.



<xsl:value-of select='substring("This is My String",2,6)'/>


But what I want to do is provide a "This is My String" as a value from XSLT expression like below.



<xsl:value-of select='substring(<xsl:value-of select="searchpage/header/para[2]/text"/>,2,6)'/>


If I do this it gives me below error.



XML Parsing Error: not well-formed


How can i fix this?


No comments:

Post a Comment