|
Subject: Re: [xsl] what's the best way to do this From: Peder <peet.sdu@xxxxxxxxx> Date: Thu, 5 Jan 2012 15:14:48 +0100 |
i Roelof,
to be complete:
<xsl:variable name="maanden" select="'januari', 'februari', 'maart', 'april',
'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november',
'december'"/>
<xsl:template match="year">
<div id="first-pane" class="menu-list">
<p class=menu_head"><xsl:value-of select="@value"/></p>
<div class="menu-body">
<xsl:apply-templates select="month"/>
</div>
</div>
</xsl:template>
<xsl:template match="month">
<a href="#"><xsl:value-of select="index-of('maanden', number(@value))"/></a>
</xsl:template>
Best regards,
Peter
On Jan 5, 2012, at 11:33 , Roelof Wobben wrote:
>
>
> Hello,
>
>
>
> Last question and then I have the site ready.
>
>
>
> I have now this xml :
>
>
>
> <menu>
>
> <section id="9" handle="dagboek">Dagboek</section>
>
> <year value="2005">
>
> <month value="03">
>
> <entry id="17" />
>
> </month>
>
> <month value="02">
>
> <entry id="16" />
>
> <entry id="15" />
>
> <entry id="14" />
>
> </month>
>
> </year>
>
> </menu>
>
>
>
> And I like to have this output :
>
>
>
> <div id="firstpane" class="menu_list">
>
> <p class="menu_head">2005</p>
>
> <div class="menu_body">
>
> <a href="#">februari</a>
>
> <a href="#">maart </a>
>
> </div>
>
> </div>
>
>
>
> And I wonder now what's the best approach to get all the months under the
year ?
>
>
>
> Regards,
>
>
>
> Roelof
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] what's the best way to do, Peder | Thread | [xsl]Question about ending document, Colin DeClue |
| Re: [xsl] what's the best way to do, Peder | Date | [xsl]Question about ending document, Colin DeClue |
| Month |