<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi there,<br>
<br>
I am using XEP as my engine to generate PDF. I encounter a problem
related to render an XML file with DTD.<br>
<br>
The situation on my side is like the following:<br>
I have a DTD and an XML file. There a doctype definition row in the XML
like the following:<br>
<br>
<font face="Verdana">&lt;!DOCTYPE Book PUBLIC 'XXXXXXXXXXX'
'XXXXXX.dtd'[]&gt;</font><br>
<br>
I can edit this XML file in XMetaL. XMetaL tells me the XML file is OK
when I validate the XML file.&nbsp; From this point, I think the DTD and XML
are both correct. <br>
<br>
I have an XSL for rendering the XML to PDF. When I try to use XEP 4.9
(JDK1.5) to render it to PDF. I got the following error. <br>
<font face="Verdana"><br>
[error] Error reported by XML parser; SystemID: <a class="moz-txt-link-freetext" href="file:/D:/XXXXXX.dtd">file:/D:/XXXXXX.dtd</a>;
Line#: 214; Column#: 27<br>
[error] javax.xml.transform.TransformerException: Error reported by XML
parser<br>
error: formatting failed: javax.xml.transform.TransformerException:
org.xml.sax.<br>
SAXParseException: Not a name start character, U+23</font><br>
<br>
The content at 214 is like the following:<br>
<br>
&lt;!ELEMENT TERM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (EFFECT?, (#PCDATA|REFP)+) &gt;<br>
<br>
The XML parser tells me the DTD is incorrect.&nbsp; I changed above line
into the following. The error disappears.<br>
<br>
&lt;!ELEMENT TERM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (EFFECT?, (REFP)+) &gt;<br>
<br>
It seems the XML parser did not recognize #PCDATA. It still try to
treat it as an element. <br>
<br>
Do you have any idea about this?<br>
<br>
Thanks very much<br>
<br>
Long<br>
<br>
<br>
</body>
</html>