[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] text output and space padding


Subject: RE: [xsl] text output and space padding
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 31 May 2001 16:16:45 +0100

> 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() &lt;= $x]">
  <xsl:value-of select=" "/>
</xsl:for-each>

Mike Kay
Software AG
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread