[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Numbering 1st 2nd 3rd ...

Subject: Re: Numbering 1st 2nd 3rd ...
From: Steve <subsume@xxxxxxxxx>
Date: Tue, 12 Sep 2006 17:33:53 -0400
1st 2nd algorithm
Recursive algorithm? (template which starts at the first, and calls
itself passing param = param + 1).

-s

On 9/12/06, Spencer Tickner <spencertickner@xxxxxxxxx> wrote:
Hi List,

Thanks in advance for the help. I'm wondering if there's an elegant
way to format position() like:
1st 2nd 3rd and so on. I've looked through google for a format that
works with xsl:number, but haven't been able to find anything. I know
I could always do a long <xsl:choose> statement, but it feels wrong.
Anyway here's some samples

XML

<root>
 <num>foo</num>
 <num>bar</num>
</root>

Output

<root>
<num>1st</num>
<num>2nd</num>
</root>

Cheers,

Spencer

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.