<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content=text/html;charset=ISO-8859-1>
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Actually, that isn't a valid XML DTD.&nbsp; This 
content model is valid in SGML but not XML:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; &lt;!ELEMENT 
TERM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (EFFECT?, (#PCDATA|REFP)+) &gt;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>See section 3.2.2 in the XML standard:</FONT></DIV>
<DIV><FONT face=Arial size=2><A 
href="http://www.w3.org/TR/REC-xml/#sec-mixed-content">http://www.w3.org/TR/REC-xml/#sec-mixed-content</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>In XML, the #PCDATA must come first.&nbsp; XMetal 
can validate SGML, so perhaps it thinks it is SGML?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>Bob Stayton<BR>Sagehill Enterprises<BR>DocBook Consulting<BR><A 
href="mailto:bobs@sagehill.net">bobs@sagehill.net</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=longjingjun@gmail.com href="mailto:longjingjun@gmail.com">JingJun 
  Long</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=xep-support@renderx.com 
  href="mailto:xep-support@renderx.com">xep-support@renderx.com</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, February 08, 2007 10:49 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [xep-support] DTD 
  validation</DIV>
  <DIV><BR></DIV>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></BLOCKQUOTE></BODY></HTML>