Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] setInternalDTDSubset

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] setInternalDTDSubset
  • Date: Fri, 14 Jan 2005 14:22:34 -0800

During tests I've so far found two files where roundtripping of the internal subset breaks due too escaping of quote characters. The files are from the W3C conformance test suite:

w3c-xmlconformance/xmltest/valid/sa/066.xml
w3c-xmlconformance/xmltest/valid/sa/101.xml

Specifically, DocType.setInternalDTDSubset(DocType.getInternalDTDSubset()) fails with an exception.

nu.xom.IllegalDataException: Malformed internal DTD subset: The declaration for the entity "e" must end with '>'.
at nu.xom.Verifier.checkInternalDTDSubset(Unknown Source)
at nu.xom.DocType.setInternalDTDSubset(Unknown Source)

For example here is an input document:

<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
<!ENTITY e "&#34;">
]>
<doc></doc>

doc.toXML() output:

<?xml version="1.0"?>
<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
<!ENTITY e """>
]>
<doc />

Any thoughts?
Wolfgang.





Archive powered by MHonArc 2.6.24.

Top of Page