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

How to produce   using XSL

Subject: How to produce   using XSL
From: Valer-Alin Crisan <valer_crisan@xxxxxxxxx>
Date: Thu, 30 Oct 2008 17:18:47 -0700 (PDT)
 How to produce &nbsp; using XSL
Hi,

I need to generate HTML pages from XML files using PHP and I
am unable to produce the text "&nbsp;" into the generated output
using PHP XLS processor that is based on libxslt. The same problem
happens when I use xsltproc tool.

I could not figure out how to solve this by reading the posts at http://www.dpawson.co.uk/xsl/sect2/nbsp.html. Any idea is greatly appreciated. Thanks!

Here are the details:

xsltproc version:
===========
$ xsltproc --version
Using libxml 20632, libxslt 10124 and libexslt 813
xsltproc was compiled against libxml 20632, libxslt 10124 and libexslt 813
libxslt 10124 was compiled against libxml 20632
libexslt 813 was compiled against libxml 20632

XSL file:
======
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY nbsp " ">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" indent="no" encoding="iso-8859-1" media-type="text/html"/>
<xsl:template match="/doc">
<HTML>
  <BODY>
    <table><tr><td>&nbsp;</td><td> </td><td> </td></tr></table>
  </BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>

XML input file:
======
<?xml version="1.0" encoding="ISO-8859-1"?>
<doc></doc>

XSLTPROC output:
==============
$ xsltproc simple.xsl simple.xml
<HTML><BODY><table><tr><td>
</td><td>
</td><td></td></tr></table></BODY></HTML>

Expected output:
===========
At least one of the td elements should contain the &nbsp; text.

Thanks,
Valer

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.