This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Q.) xsl (if no param, set to 'xyz'?)
- To: XSL List <xsl-list at mulberrytech dot com>
- Subject: Q.) xsl (if no param, set to 'xyz'?)
- From: Stephen Cunliffe <scunliffe at digitalfairway dot com>
- Date: Tue, 28 Nov 2000 13:14:53 -0600
- Organization: Digital Fairway Corporation
- Reply-To: xsl-list at mulberrytech dot com
Hi,
Often times in my xsl's, I'm checking for a param value, and outputing
different HTML/calling different template/stylesheets based on the
value.
Example: (Rainbow)
<!--[need logic here for: [test="not($rainbow_colour)" set to
'orange']]-->
<xsl:when test="$rainbow_colour='red'">
<xsl:apply-templates........>
</xsl:when>
<xsl:when test="$rainbow_colour='orange'">
<xsl:apply-templates........>
</xsl:when>
<xsl:when test="$rainbow_colour='yellow'">
<xsl:apply-templates........>
</xsl:when>
<xsl:when test="$rainbow_colour='green'">
<xsl:apply-templates........>
</xsl:when>
etc.
How do I do the "logic" at the top, to supply a default value for the
parameter, IF it doesn't have a value...
If I can't do this... how do I do a workaround for it?
Cheers,
Steve
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list