xsl-list
[Top] [All Lists]

Re: [xsl] Eliminating leading zeros

2006-08-21 06:58:12


  If you don't know how many leading zeros there may be (but I guess
you know, because you add them yourself), 

oh I missed that. If the input is under your control then you can make
it look like

<stuff><padding>000</padding>5 (foo)</stuff>
<stuff><padding>00</padding>15 (bar)</stuff>
...

sorting on "stuff" will work the same way (as the string value of stuff
is unaffected by adding the padding markup, and then to render the
contents you use apply-templates together with
<xsl:template match="padding"/>

David

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>