[jdom-interest] builder.setIgnoreDTD()

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Feb 6 09:38:35 PST 2002


At 10:44 AM -0600 2/6/02, Brett D. McLaughlin, Sr. wrote:

>The entities are defined in the DTD, so if you ignore the DTD, you
>therefore ignore what's in it, which means ignoring the entities ;-)
>

You ignore the external DTD subset. That's not quite the same as 
ignoring the DTD. For example, this document contains an external 
entity that will be resolved even with DTD loading turned off:

<!DOCTYPE test [
   <!ENTITY test SYSTEM "test.txt">
]>
<test>
   &test;
</test>

I don't think it's acceptable to replace the &test; entity with the 
empty string. It's acceptable to replace it with an EntityRef object 
but not with the empty string.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list