xsl-list
[Top] [All Lists]

Re: [xsl] How to produce using XSL

2008-10-31 08:26:55
Hi,
I suppose wrapping spaces into <xsl:text> element sould help you.

Josef

2008/10/31 Valer-Alin Crisan <valer_crisan(_at_)yahoo(_dot_)com>

Hi,

I need to generate HTML pages from XML files using PHP and I
am unable to produce the text " " 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> </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   text.

Thanks,
Valer




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--