|
Subject: Re: [xsl] xsl:for-each question From: "Emmanuil Batsis (Manos)" <mbatsis@xxxxxxxxxxx> Date: Thu, 30 Oct 2003 16:03:15 +0200 |
Thank you very much, you´re right. I´m yet not really in the thinking of templates. I still try to "program" my xslt like I´m used to do it with Java-Programs.
* point1
o subpoint1.1
+ subsubpoint1.1.1
# subsubpoint1.1.1.1
o subpoint1.2
* point2
* point3
* point4
test.xml: =============================== <?xml-stylesheet href="test.xsl" type="text/xsl"?> <root> <topic name="point1"> <topic name="subpoint1.1"> <topic name="subsubpoint1.1.1"> <topic name="subsubpoint1.1.1.1"> </topic> </topic> </topic> <topic name="subpoint1.2"> </topic> </topic> <topic name="point2"> </topic> <topic name="point3"> </topic> <topic name="point4"> </topic> </root>
<xsl:template match="/">
<html><head></head><body>
<ul>
<xsl:apply-templates/>
</ul>
</body></html>
</xsl:template>
<xsl:template match="topic"> <li> <xsl:value-of select="@name"/> <xsl:if test="topic"> <ul> <xsl:apply-templates/> </ul> </xsl:if> </li> </xsl:template>
<xsl:template match="@*|text()"/> </xsl:transform>
-- Manos Batsis
_ __ __ __ / |/ /__ / /____ __ _ ___ _____/ /_ / / -_) __(_-</ ' Y _ `/ __/ __/ /_/|_/\__/\__/___/_/_/_|_,_/_/ \__/
http://www.netsmart.gr mbatsis at netsmart dot gr (+30) 210 33 02 608 (+30) 210 33 02 658 http://forte.netsmart.gr/foaf/manos_foaf.rdf
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] xsl:for-each question, Michael Olszynski | Thread | Re: [xsl] xsl:for-each question, Michael Olszynski |
| Re: [xsl] Select statement within H, andrew . curry | Date | Re: [xsl] Select statement within H, andrew . curry |
| Month |