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

[xsl] Indent based on position()

Subject: [xsl] Indent based on position()
From: "Brook Elgie" <brook.elgie@xxxxxxx>
Date: Thu, 11 Apr 2002 12:31:35 +0100

Hello all,

I've got the XML code:

    <line>This is the first line</line>
    <line>This is the second line</line>
    <line>This is the third line</line>
    <line>This is the forth and last line</line>

And would like the html output:

    -This is the first line<br/>
    --This is the second line<br/>
    ---This is the third line<br/>
    ----This is the forth line<br/>

So, when i process each <line> I need to duplicate the "-" character as many
times as the position() of the <line> being processed, I think. Can I do


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread