In this case, you can do without the xsl:text:
<xsl:variable name="bg_img">
<xsl:choose>
<xsl:when test="normalize-space($all_vars)=''">background_bright</xsl:when>
<xsl:otherwise>background_faded</xsl:otherwise>
</xsl:choose>
</xsl:variable>
I too am annoyed by the syntax. My pet peev is that xsl:attribute has to
be the first element. This is really annoying if you want to optionally
add an attribute.
<xsl:variable name="bg_img">
<xsl:choose>
<xsl:when test="normalize-space($all_vars)=''">
<xsl:text>background_bright</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>background_faded</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Is there a cleaner / simpler way to do this? Any chance you can do
this in one line?
Karl..
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--
Kamal Bhatt
--
Disclaimer: This email is confidential and may contain privileged information
for the sole use of the person or business to which it is addressed. If you are
not the intended recipient, please notify the sender by return e-mail or phone
as you must not view, disseminate, distribute or copy this email without our
consent. We do not accept any liability in connection with any computer virus,
data corruption, incompleteness, or unauthorised amendment of this email. It is
the sole responsibility of the receiver to scan for viruses before opening.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--