[jdom-interest] DocType Modification

Jason Hunter jhunter at collab.net
Tue Jun 12 10:15:37 PDT 2001

Kevin Baynes wrote:
> I have an XML document with the following doctype declaration:
> <!DOCTYPE users SYSTEM "users.dtd">
> After using JDOM to open and modify the contents, JDOM writes the doctype
> as:
> "file:/C:/jakarta-tomcat-4.0-b1/webapps/kalispell/data/users.dtd">
> Why does this happen?

The SAX parser calculates the absolute path and passes it to JDOM.  JDOM
never sees the relative path.

> Is my usage incorrect?

Nope, you're doing fine.

> Is there a way to prevent this?

I really hope so.  But I don't know of any SAX feature addressing this. 
It may require JDOM plugging into the parser underneath SAX.  Anyone
have suggestions?


More information about the jdom-interest mailing list