[xep-support] DTD validation
JingJun Long
longjingjun at gmail.com
Thu Feb 8 22:49:23 PST 2007
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20070209/e133968b/attachment.html>
More information about the Xep-support
mailing list