cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT right-alignment of a number - easy points surely?!

Former Member
0 Kudos

Hi guys,

A quick dumb question for you. I've been looking for the answer for a while but am no expert in using XSL/XSLT programming.

One of my XI mapping XSLTs has the following code snippet:

<xsl:value-of select="substring(./IDTNR,12,7)"/>

<xsl:value-of select="substring($spaces,1,11)"/>

<b><xsl:value-of select="format-number(../MENGE, integer)"/></b>

<xsl:value-of select="substring($spaces,1,8)"/>

The quantity field in bold (MENGE) needs to be right-aligned in the resulting file. How do I do this?

Many thanks,

Stuart Richards

Accepted Solutions (0)

Answers (2)

Answers (2)

moorthy
Active Contributor
0 Kudos

HI,

Have look into this for format number-

http://www.w3schools.com/xsl/func_formatnumber.asp

Regards,

Moorthy

former_member206604
Active Contributor
0 Kudos

Hi,

Do you want leading zero's in the quantity field, if so it can be archived by this way.

<xsl:value-of select="format-number(../MENGE, 0000000000000)"/>

Thanks,

Prakash