Subject: RE: [xsl] Recursion Examples From: Robert Seber <robert.seber@xxxxxxxxxxxxxxxxxx> Date: Tue, 1 May 2001 16:06:35 +0100 |
This XSL will produce that result: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/module"> <html> <head> </head> <body> Root Module<br/> <xsl:apply-templates select="module|module/module"/> </body> </html> </xsl:template> <xsl:template match="module"> <xsl:for-each select="ancestor::*">   </xsl:for-each> Module<xsl:value-of select="@id"/><input type="checkbox" name="ParentModuleID" value="{@id}"/> <br/> </xsl:template> </xsl:stylesheet> > -----Original Message----- > From: Jon Wynacht [mailto:jwynacht@xxxxxxxxx] > Sent: Tuesday, May 01, 2001 3:41 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: [xsl] Recursion Examples > > > Dan/Listers, > > I would envision a simple HTML to be as follows: > > Root Module<br/> > >    Module1<input type="checkbox" name="ParentModuleID" > value="1"/><br/> > >       Module4<input type="checkbox" > name="ParentModuleID" value="4"/><br/> > >       Module5<input type="checkbox" > name="ParentModuleID" value="5"/><br/> > >       Module6<input type="checkbox" > name="ParentModuleID" value="6"/><br/> > >    Module2<input type="checkbox" name="ParentModuleID" > value="1"/><br/> > >       Module7<input type="checkbox" > name="ParentModuleID" value="4"/><br/> > >       Module8<input type="checkbox" > name="ParentModuleID" value="5"/><br/> > >       Module9<input type="checkbox" > name="ParentModuleID" value="6"/><br/> > > A more complex one would use folder icons and images that > mimicked tree > branches. That, I'm sure, could be expanded on from the code > that creates > the above. > > Possible? > > Thanks, > > Jon > > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Dan Diebolt > Sent: Tuesday, May 01, 2001 6:42 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: [xsl] Recursion Examples > > > >I want to be able to display the results as a > >tree in html...for example: > > root module > |--modulue1 > |---module4 > |---module5 > |---module6 > |--module2 > |---module7 > |---module8 > |---module9 > > Post the html you would markup the above to get the desired > indention effect. There are several ways of getting indention > in html - all of which have some disadvantage. Do you really > want pipes and minus signs? > > Regards, > > Dan > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > > > 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 -> |
---|---|---|
RE: [xsl] Recursion Examples, Jon Wynacht | Thread | RE: [xsl] Recursion Examples, Jon Wynacht |
RE: [xsl] using multiple xsl's with, Michael Kay | Date | RE: [xsl] hex\decimal, Gollwitzer Brian Con |
Month |