[jdom-interest] adding EntityRef to Document throws Exception

Elliotte Harold elharo at metalab.unc.edu
Thu Sep 9 08:09:12 PDT 2004

Quinten Verheyen wrote:

> Hi,
> I wonder how one adds an entity to a document type, I want something 
> like this :
> <!DOCTYPE blabla SYSTEM "first.DTD" [<!ENTITY % extension SYSTEM 
> "second.dtd"> %extension; ]>
> I didn't find any method in DocType who could do the job, so I assumed 
> /Document.addContent(Content content)/ (the class EntityRef extends 
> Content) would be the thing to use :

No. An entity reference is not an entity declaration. JDOM doesn't 
really expose any API for modifying the internal DTD subset.


More information about the jdom-interest mailing list