RE: [xsl] Custom Ordered Lists

Subject: RE: [xsl] Custom Ordered Lists
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 13 Nov 2006 10:43:25 -0000
Ah, I see - perhaps it wasn't a question about sorting at all, but about
numbering.

I guess you have your answer: except that if you are sorting AND numbering,
then by default xsl:number will give you the position in the source
document, not the position in the sorted list. If you want the latter, use

<xsl:for-each select="....">
  <xsl:sort ....
  <xsl:number value="position()" format="(a)"/>

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

> -----Original Message-----
> From: Michael Kay [mailto:mike@xxxxxxxxxxxx] 
> Sent: 13 November 2006 10:03
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [xsl] Custom Ordered Lists
> 
> 
> 
> It's a little bit difficult to work out what collation you 
> want from an example that only includes three values, one of 
> them duplicated. Could you be a bit more specific?
> 
> XSLT 2.0 has a lot of support for defining the collation you 
> want, but a lot of the details end up being 
> implementation-defined. So the answer might be product-dependent.
> 
> Michael Kay
> http://www.saxonica.com/ 
> 
> > -----Original Message-----
> > From: Philip Vallone [mailto:philip.vallone@xxxxxxxxxxx]
> > Sent: 13 November 2006 09:08
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: [xsl] Custom Ordered Lists
> > 
> > Hi,
> > 
> > Is it possible to create ordered lists like this? I am 
> using XSLT 2.0 
> > with HTML output.
> > 
> > (a) Test
> > (b) Test
> > (c) test
> > 
> > Thanks
> > 
> > Phil

Current Thread