[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: what's the best way to do this

Subject: Re: what's the best way to do this
From: Peder <peet.sdu@xxxxxxxxx>
Date: Thu, 5 Jan 2012 15:09:05 +0100
Re:  what's the best way to do this
Hi Roelof,

You can do something like this:

<xsl:variable name="maanden" select="'januari', 'februari', 'maart', 'april',
'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november',
'december'"/>

And in your template for month:
<xsl:template match="month">
	<a href="#"><xsl:value-of select="index-of('maanden', number(@value))"/></a>
</xsl:template>

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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.