This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: text output and space padding
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] text output and space padding
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 31 May 2001 16:16:45 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> So that means I need to write
> data padded
> with space if the data does not fill up to the required length.
The two popular solutions to this, both of which rely on the length not
exceeding some known limit, are:
(a) take a substring() of a string containing a large number of spaces,
defined in a variable
(b) iterate over some arbitrary node-set, e.g. //node():
<xsl:for-each select="//node()[position() <= $x]">
<xsl:value-of select=" "/>
</xsl:for-each>
Mike Kay
Software AG
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list