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

RE: Inserting White Space (  ) through XSL.

Subject: RE: Inserting White Space (  ) through XSL.
From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Fri, 30 Apr 2004 09:41:25 -0500
xsl nbsp
Hi Animesh,

Using Xselerator it works just fine, I only ask myself why do you have

<xsl:copy>
<xsl:apply-templates select="*|text()|@*"/>
</xsl:copy>

inside the template? 

My xslt is as follows:

<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html" omit-xml-declaration="yes"/>

<xsl:template match="/">

<table width="300" border="1" cellpadding="1" cellspacing="5">
<tbody>
<tr>
<td>&#160;</td>
<td>&#160;</td>
<td>&#160;</td>
</tr>
<tr>
<td>&#160;</td>
<td>&#160;</td>
<td>&#160;</td>
</tr>
</tbody>
</table>

</xsl:template>

</xsl:transform>


And the output is:

<table width="300" border="1" cellpadding="1" cellspacing="5">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>

Which is what you wanted, right?

Cheers,
<prs/>

-----Original Message-----
From: Animesh Sharma [mailto:asharma@xxxxxxxxxxxxxxxx] 
Sent: Friday, April 30, 2004 3:05 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Inserting White Space (&nbsp; ) through XSL.

hi,

I'm trying to insert white space or &nbsp; using following XSL.

<xsl:template
match="//body/namespace/form/snip/csf/div/center/p[position()=1]">
<xsl:copy><xsl:apply-templates select="*|text()|@*"/></xsl:copy> <table
width="300" border="1" cellpadding="1" cellspacing="5"> <tbody> <tr>
<td>&#160;</td> <td>&#160;</td> <td>&#160;</td> </tr>

<tr>
<td>&#160;</td>
<td>&#160;</td>
<td>&#160;</td>
</tr>

</tbody>
</table>

</xsl:template>

As can be seen, whole purpose of writing this XSL is to create Empty table
where borderline(of cell) is visible. But no matter whether I use
<xsl:text></xsl:text> or <td>&#160;</td>. I'm not getting Empty Table. 
No Empty cell is visible inside the table. Only outer boundary of Table is
visible.

Thanks and regards,
Animesh

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.