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

how can I rewrite it so I have a variable for year

Subject: how can I rewrite it so I have a variable for year
From: "Murray McDonald" <m.mcdonald@xxxxxxxxx>
Date: Fri, 6 Jan 2012 14:27:27 -0500
 how can I rewrite it so I have a variable for year
This is how to pass the year as a parameter to the month template.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


<xsl:import href="../utilities/date-time.xsl"/>

 

<xsl:template match="data/menu">
  <div id="firstpane" class="menu_list">
     <xsl:apply-templates select="year" />
 </div>
</xsl:template>

<xsl:template match="year">
 <p class="menu_head"> <xsl:value-of select="@value"/>  </p>
  <div class="menu_body">
      <xsl:apply-templates select="month">
		  <xsl:with-param name="theYear" select="@value"/>
      </xsl:apply-templates>
 </div>
</xsl:template>
 
<xsl:template match="month">
 <xsl:param name="theYear" select="'Year not provided'"/>
 <a href="{$root}/dagboek/{$theYear}/{@value}/1" > 
  <xsl:call-template name="format-date">
 <xsl:with-param name="date" select="concat('2222','-',@value,'-01')"/>
 <xsl:with-param name="format" select="'M'"/>
  </xsl:call-template>
</a> 
</xsl:template>
 
</xsl:stylesheet>

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.