[xep-support] DTD validation

From: JingJun Long <longjingjun@gmail.com>
Date: Thu Feb 08 2007 - 22:49:23 PST

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:

<!DOCTYPE Book PUBLIC 'XXXXXXXXXXX' 'XXXXXX.dtd'[]>

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:

<!ELEMENT TERM (EFFECT?, (#PCDATA|REFP)+) >

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

<!ELEMENT TERM (EFFECT?, (REFP)+) >

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

Long

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Thu Feb 8 23:22:26 2007

This archive was generated by hypermail 2.1.8 : Thu Feb 08 2007 - 23:22:30 PST