$listcould be a string, a number, a set of node, whatever. The result will be a string. And yes, the last character will be a space.
For instance:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:variable name="node">
<node>
<subnode>string</subnode>
<subnode>otherstring</subnode>
</node>
</xsl:variable>
<xsl:variable name="string" select="concat($node,' ')"/>
<xsl:value-of select="string-length($string)"/>
<xsl:value-of select="substring-before($string,' ')"/>
</xsl:template>
</xsl:stylesheet>
returns
18stringotherstring
source
share