|
top
|
Subject: Writing strings of characters at specified locations Author: James Durning Date: 28 Jan 2008 09:37 AM
|
I can think of one way. Assuming your values are in value1, value2, and value3 accordingly:
<xsl:variable name="spaces" select="' '"/><!-- at least as big as the greatest length (NOTE, this forum has truncated the spaces to a single space) -->
<xsl:variable name="length1" select="20"/>
<xsl:variable name="length2" select="10"/>
<xsl:variable name="length3" select="40"/>
<xsl:value-of select="concat(value1, substring($spaces, 1, $length1 - string-length(value1))"/>
<xsl:value-of select="concat(value2, substring($spaces, 1, $length2 - string-length(value2))"/>
<xsl:value-of select="concat(value3, substring($spaces, 1, $length3 - string-length(value3))"/>
Would add as many spaces as are needed to fill up the length.
|
|
|