Created
November 6, 2012 13:39
-
-
Save anonymous/4024791 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<data> | |
<plant-of-the-month> | |
<section id="20" handle="plant-of-the-month">plant of the month</section> | |
<entry id="99"> | |
<genus handle="fgfg">fgfg</genus> | |
<common-name handle="ggfdgb">ggfdgb</common-name> | |
<latin-name handle="dghgh">dghgh</latin-name> | |
<flowers-jan>Yes</flowers-jan> | |
<flowers-feb>Yes</flowers-feb> | |
<flowers-mar>No</flowers-mar> | |
<!--etc--> | |
</entry> | |
</plant-of-the-month> | |
</data> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="xml" indent="yes" /> | |
<xsl:template match="data/plant-of-the-month/entry"> | |
<h3>Plant of the Month</h3> | |
<!-- flowers --> | |
<!--jan--> | |
<xsl:choose> | |
<xsl:when test="flowers-jan='Yes'"><a class="btn btn-success" href="{$root}/plants/jan/"> Jan </a></xsl:when> | |
<xsl:otherwise><a class="btn" href="{$root}/plants/jan/"> Jan </a></xsl:otherwise> | |
</xsl:choose> | |
<!--feb--> | |
<xsl:choose> | |
<xsl:when test="flowers-feb='Yes'"><a class="btn btn-success" href="{$root}/plants/feb/"> Feb </a></xsl:when> | |
<xsl:otherwise><a class="btn" href="{$root}/plants/feb/"> Feb </a></xsl:otherwise> | |
</xsl:choose> | |
<!--march--> | |
<xsl:choose> | |
<xsl:when test="flowers-mar='Yes'"><a class="btn btn-success" href="{$root}/plants/mar/"> Mar </a></xsl:when> | |
<xsl:otherwise><a class="btn" href="{$root}/plants/mar/"> Mar </a></xsl:otherwise> | |
</xsl:choose> | |
<!--etc--> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment