[jdom-interest]   not getting converted to  

Robert Taylor rtaylor at mulework.com
Thu Apr 22 13:00:01 PDT 2004

Greetings, I'm using JDOMBeta10 and am trying to transform an XML document into an HTML document.
I've chosen Xalan-Java v2.6.0 for transformation and have set the system property
javax.xml.transform.TransformerFactory with org.apache.xalan.processor.TransformerFactoryImpl as
discussed here:


based on this documentation:


it appears that there is an encoding issue.

I can use the same xml document and style sheet with "pure" Xalan classes
and the document is transformed as expected.

<?xml version="1.0"?>


<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html" indent="yes"/>

<xsl:template match="/">

<xsl:template match="data">
This&#160;is&#160;some&#160;text&#160; <xsl:value-of select="."/>


JDOM output:
<?xml version="1.0" encoding="UTF-8"?>
<html><head /><body>
This is some text  123456</body></html>

Xalan output:
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
This&nbsp;is&nbsp;some&nbsp;text&nbsp; 123456</body>

Any ideas?


More information about the jdom-interest mailing list