Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XSLT function for padding value with characters

From: "Chip Pearson" <chip@--------.--->
To: NULL
Date: 5/3/2007 8:35:00 AM

I am considering using XSLT to take existing XML data files and creating 
text files that  will be imported to other programs. These import files must 
be formatted text not XML. For example, vendor numbers must be 12 digits 
padded on the left with 0's and product names must be 30 characters padded 
on the right with spaces. Is there a way using XSLT to pad out a value to a 
specified length using a specified padding character? I can't have the 
formatted values in the XML data itself because one XML node value will be 
going to multiple output text files each with its own formatting 
requirements.

Any suggestions would be most welcome. Thank you very much.


-- 
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site) 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent