In XSLT, how do I truncate a value to the first five characters?



So, I know absolutely nothing about XSLT. I don't know what I'm doing, I don't know what I'm supposed to make the code do, and I don't know how to make it do whatever it is supposed to do.


That being said, I know I'm supposed to truncate a name to the first five characters.


I have this:



<xsl:if test="string-length(/myQuery/Arguments/FirstName) &gt;= 6">
<xsl:variable name = "x" select = "substring(/myQuery/Arguments/FirstName, 1, 5)"/>
</xsl:if>


So, that does assign a truncated version of FirstName to X. But how do I get it back into FirstName?


No comments:

Post a Comment