This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Q.) xsl (if no param, set to 'xyz'?)


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]