Re: [xep-support] DTD validation

From: Bob Stayton <>
Date: Fri Feb 09 2007 - 00:26:23 PST

Actually, that isn't a valid XML DTD. This content model is valid in SGML but not XML:


See section 3.2.2 in the XML standard:

In XML, the #PCDATA must come first. XMetal can validate SGML, so perhaps it thinks it is SGML?

Bob Stayton
Sagehill Enterprises
DocBook Consulting

  ----- Original Message -----
  From: JingJun Long
  Sent: Thursday, February 08, 2007 10:49 PM
  Subject: [xep-support] DTD validation

  Hi there,

  I am using XEP as my engine to generate PDF. I encounter a problem related to render an XML file with DTD.

  The situation on my side is like the following:
  I have a DTD and an XML file. There a doctype definition row in the XML like the following:


  I can edit this XML file in XMetaL. XMetaL tells me the XML file is OK when I validate the XML file. From this point, I think the DTD and XML are both correct.

  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.

  [error] Error reported by XML parser; SystemID: file:/D:/XXXXXX.dtd; Line#: 214; Column#: 27
  [error] javax.xml.transform.TransformerException: Error reported by XML parser
  error: formatting failed: javax.xml.transform.TransformerException: org.xml.sax.
  SAXParseException: Not a name start character, U+23

  The content at 214 is like the following:


  The XML parser tells me the DTD is incorrect. I changed above line into the following. The error disappears.


  It seems the XML parser did not recognize #PCDATA. It still try to treat it as an element.

  Do you have any idea about this?

  Thanks very much


(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
Received on Fri Feb 9 00:59:44 2007

This archive was generated by hypermail 2.1.8 : Fri Feb 09 2007 - 00:59:45 PST