xsl-list
[Top] [All Lists]

Whitespace in Table Cells

2003-07-26 10:22:56
I would call myself an intermediate-level "XSL guy."  I am currently trying to 
generate a form from an existing XML instance by utilizing XSL, and part of the 
form involves a grid for six possible choices for values.  If any fewer than 
all six values are present (which occurs almost all the time), I would like the 
other portions of the grid to display as empty.  However, when I build code to 
do this with XSL, it turns out that the empty portions of the grid do not 
render at all, and the grid looks as though it only has room for the values it 
displays.  For example, if there are two values, the space occupied by the grid 
as a whole is occupied instead with two data cells and nothing more.
 
I have tried several workarounds: utilizing <xsl:text> within a <td> element, 
calling a variable whose value is whitespace within a <td> element, calling a 
template with a parameter whose value is whitespace within a <td> element, and 
utilizing &nbsp; and &#160 (which actually causes the page to bomb in Internet 
Explorer 6 and I am not quite sure why) within a <td> element.  None of these 
have worked.
 
I never thought something so trivial as whitesapce could be so perplexing.  Are 
the circumstances I described unique to Internet Explorer, or would they arise 
just as seamlessly in other renderings (e.g. by Xalan)?  And of course, any 
solutions or insights into this problem would be greatly appreciated.
 
Thanks very much.

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



<Prev in Thread] Current Thread [Next in Thread>