This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: text output and space padding


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]