[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: monotonous nbsp coding

Subject: RE: monotonous nbsp coding
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Thu, 14 Nov 2002 09:33:13 -0000
xslt nbsp
> This gets monotonous after a while.  It would be nice if 
> <xsl:value-of>
> could take an attribute which would provide a default value 
> if the select
> produces an empty result!

Yes I have always moaned about the problems of element minimisation with
the current crop of browsers - how nice it would be to simply have a
minimisation="no" on the serialiser...

There is light at the end of the tunnel though, with an xhtml output
method in xslt 2 and if-then-else in xpath 2.

cheers
andrew


> -----Original Message-----
> From: Zakon, Stuart [mailto:stuart_zakon@xxxxxxxxxxxxxxx]
> Sent: 13 November 2002 21:51
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  monotonous nbsp coding
> 
> 
> Some older browsers have a problem rendering tables with 
> empty <td> tags in
> them. (You know which ones...)
> Is there a better way to code this in XSLT than the following:
> 
> <td>
>   <xsl:choose>
>     <xsl:when test="string-length() &gt; 0"><xsl:value-of select="."
> /></xsl:when>
>     <xsl:otherwise>&nbsp;</xsl:otherwise>
>   </xsl:choose>
> </td>
> 
> This gets monotonous after a while.  It would be nice if 
> <xsl:value-of>
> could take an attribute which would provide a default value 
> if the select
> produces an empty result!
> 
> Stuart Zakon
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.