cancel
Showing results for 
Search instead for 
Did you mean: 

Padding with leading zeroes

Former Member
0 Kudos

Hi All,

I am using XSLT mapping.I want to get the field in the receiver side with the leading zeros.Source field: XSD:decimal and length is 10.If input is 12345, i have to get 0000012345.

Can anybody please solve the problem and guide me if u know .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you can use format-number function in this case...

<xsl:template match="/">

<number>

<xsl:value-of select="format-number('5465','0000000000')"/>

</number>

</xsl:template>

in this function first parameter is value which u want to format and second parameter is the format(in your case lenghth of ur string)

Regards,

Abhijeet

Answers (0)