Re: [xsl] How to produce using XSL

Subject: Re: [xsl] How to produce using XSL
From: "Josef Pavlas" <pepcza@xxxxxxxxx>
Date: Fri, 31 Oct 2008 13:26:28 +0100
Hi,
I suppose wrapping spaces into <xsl:text> element sould help you.

Josef

2008/10/31 Valer-Alin Crisan <valer_crisan@xxxxxxxxx>
>
> 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

Current Thread