Subject: Re: [xsl] Recursive selection, elegantly From: Robert Koberg <rob@xxxxxxxxxx> Date: Sun, 06 Jun 2004 06:24:45 -0700 |
<?xml version="1.0" encoding="UTF-8"?> <root> <page about="/" onmenu="1"> <name>Home</name> </page> <page about="/who_we_are" onmenu="1"> <name>About us</name> </page> <page about="/contact_us" onmenu="1"> <name>Contact us</name> </page> <page about="/disclaimer"> <name>Disclaimer</name> </page> <category about="/mulberries" onmenu="1"> <name>Top fruit</name> </category> </root>
The following XSL -
<?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="/root"> <html> <head> <title/> </head> <body> <table> <tr>
</tr> </table> </body> </html> </xsl:template>
<td> <a href="{@about}"> <xsl:value-of select="name"/> </a> </td> </xsl:template>
</xsl:stylesheet>
produces output -
<html> <head> <title></title> </head> <body> <table> <tr> <td><a href="/">Home</a></td> <td><a href="/who_we_are">About us</a></td> <td><a href="/contact_us">Contact us</a></td> <td><a href="/disclaimer">Disclaimer</a></td> </tr> </table> </body> </html>
Regards, Mukul
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Recursive selection, eleg, Stephen Tredrea | Thread | xsl-list@lists.mulberrytech.com, Chen Yi |
Frustrated by result-document, davidpbrown | Date | RE: [xsl] Frustrated by result-docu, Michael Kay |
Month |