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

Re: outputting spaces in html table cells

Subject: Re: outputting spaces in html table cells
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 28 Aug 2000 11:17:17 +0100
gary sellmer
Ladioss:

Use &#160; for a non-breaking space. Your XML parser does not pick up the
named entity &nbsp; because it hasn't been declared. But a numbered
character reference (which is what &#160; is) will be recognized -- #160 is
a non-breaking space.

You can even declare nbsp in an internal subset of your stylesheet if you
want a friendlier representation of the character.

I'd bet this is a FAQ.

Enjoy,
Wendell

At 09:59 PM 8/25/00 GMT, you wrote:
>I'm a novice to XSL and my question concerns the following code:
>
>    <xsl:for-each select="listing/item">
>     <xsl:sort select="title"/>
>    	<tr>
>  	    <td class="listing"> <xsl:value-of select="blah" /> </td>
>  	    <td class="listing"> <xsl:value-of select="blah2" /> </td>
>  	    <td class="listing"> <xsl:value-of select="blah3" /> </td>
>        </tr>
>    </xsl:for-each>
>
>There is some code before this that generates a table.  This is all fine and 
>dandy except
>
>that if the value of "blah" is blank, and I was outputing this to html, then 
>netscape would
>
>not handle blank <td/> fields in an elegant manner because it would shift 
>the next column
>
>over one to replace the blank column.  Normally, I would insert an '&nbsp' 
>between each <td>
>
>tag so that netscape would render a space and not ignore the cell, but as 
>you know, '&' is
>
>reserved in xml.  I tried &amp;, but that doesn't render a space but rather 
>the real '&'
>
>symbol.  So my question is what is the best way to solve this problem?
>

======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 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.