[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Forcing String Length?

Subject: Re: Forcing String Length?
From: Stephen Zisk <szisk@xxxxxxxxxxxxxxx>
Date: Fri, 22 Sep 2000 16:55:02 -0400 (EST)
stephen zisk
How about:

substr (concat (<your-target-string>, ' '), 1, 10)

for blank fill, and the same with '0000000000' for zero fill. No <xsl:choose>, no extra verbiage.

My question for the day is this:

Is there away to force string length? For example, my output contains a string that must contain 10 characters but the XML source is not guaranteed to supply that number of characters.

Is there a better, shorter way than doing a long series using <xsl:choose>, testing string-length=10, string-length=9 etc and filling in the appropriate number of spaces (or 0's if it's a number)

My stylesheet HUGE because I have so many places where this must be done. It's working but I've got to find ways to trim it down.

Help!

Thanks,
Rebecca


---------- Stephen Zisk MediaBridge Technologies email: szisk@xxxxxxxxxxxxxxx 100 Nagog Park tel: 978-795-7040 Acton, MA 01720 USA fax: 978-795-7100 http://www.mediabridge.net




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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.