is any way to create function create wanted spaces in the output, because i was keep hot coding were ever i required space <xsl:text> </xsl:text >, kindly suggest a function to generate a space based on the passed parameter,please advice
is any way to create function create wanted spaces in the output, because i
Share
You may be looking at recursive template. Something like this:
Notice that invoking this would actually pollute your code even more than just putting spaces directly. For static content I would probably just use text. For dynamic content (i.e. if you want
<xsl:text> </xsl:text><xsl:value-of select="." /><xsl:text> </xsl:text>) I would use concat() function as it does not limit the number of parameters – so you could code above just as<xsl:value-of select="concat(' ', ., ' ')" />.