Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] setInternalDTDSubset bug

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>, xom-interest AT lists.ibiblio.org
  • Cc:
  • Subject: Re: [XOM-interest] setInternalDTDSubset bug
  • Date: Thu, 07 Apr 2005 08:16:09 -0400

Wolfgang Hoschek wrote:
xom-1.1-CVS with Crimson JDK 1.4 (but not xerces-2.6.2) has a bug when using doc.setInternalDTDSubset(doc. getInternalDTDSubset()) with the document below. Interestingly, the document parses fine when using crimson with new Builder().build(...). I'm wondering if anything could be done about it?

I can't reproduce this one with the following test:

public void testSetInternalDTDSubsetWithCrimson() {

DocType doctype = new DocType("root");
String dtd = " <!ELEMENT doc (#PCDATA|a|b|c)*>\n"
+ " <!ATTLIST doc id ID #REQUIRED>\n"
+ " <!ELEMENT a (#PCDATA|a|b|c)*>\n"
+ " <!ATTLIST a id ID #REQUIRED>\n"
+ " <!ELEMENT b (#PCDATA|a|b|c)*>\n"
+ " <!ATTLIST b id ID #REQUIRED>\n"
+ " <!ELEMENT c (#PCDATA|a|b|c)*>\n"
+ " <!ATTLIST c id ID #REQUIRED >\n";
doctype.setInternalDTDSubset(dtd);
assertEquals(dtd, doctype.getInternalDTDSubset());

}

Given that this is likely a Crimson bug, and that if it is I don't see any obvious way to work around it, I'm inclined not to worry about it too much. If you could figure out a way to write a unit test that exposes it (especially if it doesn't require me to manually hack the Verifier class just to load Crimson there); I could take another look. However, I suspect I should just blame this on Crimson weirdness, and tell people to use Xerces if they encounter it.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page