Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Adding leading zeros

From: "HEM" <no mail>
To: NULL
Date: 10/3/2005 6:28:00 PM
I have a xml files that looks something like this:
<Customers>
    <Customer>
        <CustomerNo>123</CustomerNo>
        <Balance>10.25</Balance>
    </Customer>
</Customers>

I would like to transform this into a flat file with fixed column lengths.
Positon 1-5 is customer no (5 characters)
Position 6-15 is balance. (10 characters)
The columns should have leading zeros or spaces to fill up the columns. Like 
this:
  1230000010.25 (starting with 2 spaces)
I would like to use a xslt to transform this structure to a flat file with 
fixed with columns.
My problem is that I'm not quite sure how to insert the leading zeros and 
spaces.

Can anybody please help me with this?

Best regards,
Henrik 




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