[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Transform to html
Hello Alvaro, The following stylesheet should help you in the good direction <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="element"> <xsl:value-of select="position()"/>. <xsl:value-of select="."/> </xsl:template> </xsl:stylesheet> The positon() function counts the number of times the template is called. Greetings, Agnes ----- Original Message ----- From: "Alvaro Mujica" <amujicaj@xxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, January 26, 2002 9:04 AM Subject: Transform to html > Hi, > I'm kind of new with xslt and I'm stuck with a very simple problem. I > have the xml document below and I¹m transforming it to a html document: > <text> > It is divided in three: > <list> > <element> > A > </element> > <element> > B > </element> > <element> > C > </element> > </list> > The first... > </text> > > I want to be able to show it like this: > > It is divided in three: > 1. A > 2. B > 3. C > The first... > > Thank you in advance. > Alvaro > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|