[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Custom Ordered Lists


Subject: RE: [xsl] Custom Ordered Lists
From: "Philip Vallone" <philip.vallone@xxxxxxxxxxx>
Date: Mon, 13 Nov 2006 16:57:37 -0500

Thank you for the help. I apologize for not being clear. I usually make my
list with either <UL> or <LI> but didn't even think about using
<xsl:number>.

Thank you again
Phil


-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx] 
Sent: Monday, November 13, 2006 5:43 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Custom Ordered Lists


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
Keywords