Subject: Re: [xsl] XSL Iteration... or something like that From: "MoMad" <momad_no@xxxxxxxxxxx> Date: Sat, 23 Nov 2002 18:21:12 -0800 |
I would just do something like: <xsl:template match="folder"> <xsl:apply-templates /> </xsl:template> <xsl:template match="text()"> <xsl:value-of select="." /> </xsl:template> Or something like that, give it a try. ----- Original Message ----- From: "Richard Smith" <richard@xxxxxxxxxxxxxx> To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, November 23, 2002 4:56 PM Subject: [xsl] XSL Iteration... or something like that > 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? > > -- > Richard - richard[at]gotworms.co.uk > # telnet://www.tr3.org:3000 > # Enter any 11-digit prime number to continue... > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL Iteration... or something, Richard Smith | Thread | Re: [xsl] XSL Iteration... or somet, Joerg Heinicke |
[xsl] XSL Iteration... or something, Richard Smith | Date | [xsl] xsl:key on variable containin, Grainne Reilly |
Month |