This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Transform to html
- From: "Agnes kielen" <a dot kielen at home dot nl>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Sat, 26 Jan 2002 12:24:36 +0100
- Subject: Re: [xsl] Transform to html
- References: <B877DB46.8AA%amujicaj@mi-mail.cl>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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@mi-mail.cl>
To: <xsl-list@lists.mulberrytech.com>
Sent: Saturday, January 26, 2002 9:04 AM
Subject: [xsl] 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