[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
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>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|