[jdom-interest] On-Line and Off-Line DTD

Jeff Turner jeff at socialchange.net.au
Tue Aug 28 19:56:47 PDT 2001

Two things that may be useful:

Simon St Laurent's class for manipulating the doctype definition before
parsing. It can add a doctype if one doesn't exist, or replace an
existing one:


And Norm Walsh's catalog classes, which allow you to use a local DTD
instead of a remote one (amongst other uses):




On Mon, Aug 27, 2001 at 11:52:16AM +0200, Elite Garty wrote:
> Hi
> I need to use an xml that works both online and offline, i.e. cannot have a
> reference to a remote dtd, but still has to be able to get updates whenever
> online. 
> The main problem is, I do not want to download the xml and its dtd
> separately.
> For example, I found an xml with the dtd built-in:
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE First [
> <!ELEMENT First (headline)>
> <!ELEMENT headline (#PCDATA)>
> ]>
> <First>
> <headline>
> 12324566
> </headline>
> </First>
> This would be great, because every time I get an update of the xml I get the
> dtd as well - however - I don't know how to generate it using JDom tools,
> and don't know how to parse it to a document either.
> Elite

More information about the jdom-interest mailing list