|
Subject: [xsl] recursive call of template - how to find parents From: Michael Olszynski <m.olszynski@xxxxxxxxxxxxx> Date: Wed, 05 Nov 2003 09:55:56 +0100 |
############# The xml - File ############# <topic name="point1" filename="asdf"> <topic name="subpoint1" filename="asdf1"> <topic name="subsubpoint1" filename="asdf2"> <topic name="subsubsubpoint1" filename="asdf3"> </topic> </topic> </topic> <topic name="subpoint2" filename="asdf4"> </topic> </topic> <topic name="point2" filename="asdf5"> </topic> <topic name="point3" filename="asdf6"> </topic> <topic name="point4" filename="asdf7"> </topic>
<xsl:template name="sitemap">
<ul>
<xsl:for-each select="//homepage/topic">
<li>
<xsl:value-of select="."/>
</li>
<ul>
<xsl:apply-templates select="topic"/>
</ul>
</xsl:for-each>
</ul>
</xsl:template>
<xsl:template match="topic">
<li>
<xsl:value-of select="."/>
<xsl:if test="topic">
<ul>
<xsl:apply-templates select="topic"/>
</ul>
</xsl:if>
</li>
</xsl:template>| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: Re: [xsl] How To Call XSL Templ, cknell | Thread | Re: [xsl] recursive call of templat, Emmanuil Batsis (Man |
| Re: [xsl] XMP in Binary Files, Bill Humphries | Date | Re: [xsl] recursive call of templat, Emmanuil Batsis (Man |
| Month |