RE: Default values for missing elements
In response to my request for help for a faster way of outputting default values in place of missing input elements Mike Kay suggested: >You can try: >concat( optional-element, substring(default-value, boolean(optional-element)*1000000)) >but I've no idea if it's faster. to be used instead of my current construct: <xsl:choose> <xsl:when test="optional-element"> <xsl:value-of select="optional-element"/> </xsl:when> <xsl:otherwise>default-value</xsl:otherwise> </xsl:choose> Thanks for the suggestion. It worked, and is a neater solution than mine, but did not work faster (at least with Xalan 1.0) Regards, John XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format