xsl-list
[Top] [All Lists]

RE: [xsl] Numbering 1st 2nd 3rd ...

2006-09-12 14:53:53
Even if you want English only, the algorithm is a little bit more complex
than taking (position() mod 10), because 11th, 12th, and 13th are exceptions
to the general rule.

Michael Kay
http://www.saxonica.com/

 

-----Original Message-----
From: Spencer Tickner [mailto:spencertickner(_at_)gmail(_dot_)com] 
Sent: 12 September 2006 21:45
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Numbering 1st 2nd 3rd ...

Hi David,

Thanks for the response. Unfortunately I'm stuck to xslt1 for 
this job. I'll take your advice on the mod though.

Cheers,

Spencer

On 9/12/06, David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:

if you are using xslt2 just useordinal="yes" on xsl:numer.
in xslt1 you'd have to use an xsl:choose after getting the 
last digir 
as (posiotion() mod 10)

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>
--~--



--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--