|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: XSL Iteration... or something like that
Subject: Re: XSL Iteration... or something like that
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Mon, 25 Nov 2002 00:08:26 +0100
|
Isn't it easier to do it with <div> and paddings or text-indent
something similar?
<xsl:template match="folder">
<xsl:for-each select="ancestor::folder">  </xsl:for-each>
<a href="{@href}">
<xsl:value-of select="@friendlyName"/>
</a>
<br/>
</xsl:template>
Regards,
Joerg
Richard Smith wrote:
Hi,
I'm building an archive system using XML/XSL as the formatting layer.
My problem is this. I have a hierachy of folders in the listed as follows:
<folder name="archiveRoot"
friendlyName="Your archive"
href="/archive/">
<folder
name="subfolder"
friendlyName="Sub Folder"
href="/archive/subfolder" />
<folder
name="subfolder1"
friendlyName="Sub Folder 1"
href="/archive/subfolder1">
<folder name="subsubfolder1"
friendlyName="Sub Sub Folder 1"
href="/archive/subfolder1" />
</folder>
<folder name="subfolder2"
friendlyName="Sub Folder 2"
href="/archive/subfolder2" />
</folder>
Each <folder ...> element can have an infinite number of child
<folder ...> elements.
What I want to do to format these, is indent them nicely using HTML
's according to the level of the hierachy.
I've been trying now for a few days on and off, but have failed
miserably, and was wondering if anybody knew of a way to do it...
So does anyone have an idea of how to display these? Or does anyone have
any suggestions as to XML schema that would suffice the task?
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
| RSS 2.0 |
|
| Atom 0.3 |
|
|