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

Re: left zero pad digit string

Subject: Re: left zero pad digit string
From: "Christopher R. Maden" <crism@xxxxxxxxxx>
Date: Thu, 31 Aug 2000 11:32:49 -0700
.net format string pad zero
At 12:18 31-08-2000 -0400, Joel Hughes wrote:
Padding a number:
Requirement: zero pad a digit string
Example: 456 --> 000456
Where the new string length is a passed parameter to the padding template.

I am attempting to left zero pad a number.  Presently unable to get more
than 1 digit padding with my recursive padding template (below).
I desire the effect of chaining concat calls.
Code attached below.

How about <xsl:number format="000000" select="some-node"/>? Note that the format attribute's value is an attribute value template, so it can be derived from something in the source document.


-Chris
--
Christopher R. Maden, Senior XML Analyst, Lexica LLC
222 Kearny St., Ste. 202, San Francisco, CA 94108-4510
+1.415.901.3631 tel./+1.415.477.3619 fax
<URL:http://www.lexica.net/> <URL:http://www.oreilly.com/%7Ecrism/>


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.