This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]