Subject: RE: Default values for missing elements
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 24 Nov 2000 10:19:23 -0000
|
> The construct I am using (in about 20 places in my transformation) is:
>
> <xsl:choose>
> <xsl:when test="optional-element"><xsl:value-of
> select="optional-element"/></xsl:when>
> <xsl:otherwise>default-value</xsl:otherwise>
> </xsl:choose>
>
> This works, but seems to run slowly. I am using Xalan 1.0.
You can try:
concat( optional-element,
substring(default-value, boolean(optional-element)*1000000))
but I've no idea if it's faster.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|