[jdom-interest] Re: Finding the DTD

Aidan Killian aidan at concordianet.com
Tue Sep 5 03:28:19 PDT 2000


	I have a slightly more complex version of this problem.
Typically I recieve XML files with the following DOCTYPE 

<!DOCTYPE FpML PUBLIC "-//FpML//DTD Financial product Markup Language

	A System Identifier string ("FpML-1.0.dtd") may follow the public
identifier. This is quite a common situation in the SGML world that is
addressed by the Oasis Open Catalog standard.

	When using Xerces I use the EntityResolver interface:

public class Catalog implements EntityResolver 
	public InputSource resolveEntity (String publicId, String systemId)
		// ...

		return new InputSource(new FileReader(DTDpath));

	I do not believe the build(InputStream, String) method solves 
this problem. (B.T.W. I only know how to implement this in Xerces and
XML4J 1.x; I am not sure if other parsers even support entity mapping).

	Great work; I really like JDOM.

Best regards,
	Aidan Killian (ConcordiaNet Inc.)

> Message: 10
> Date: Mon, 04 Sep 2000 22:50:01 +0200
> From: Jason Hunter <jhunter at collab.net>
> To: "Muhle, Daniel" <Daniel.Muhle at mettenmeier.de>
> CC: "'jdom-interest at jdom.org'" <jdom-interest at jdom.org>
> Subject: Re: [jdom-interest] Finding the DTD
> >       SAXBuilder builder = new SAXBuilder();
> >       Document doc =  builder.build(in);
> >
> >  I get an FileNotFoundException, because the parser tries to
> > find the DTD in a directory relative to
> > the directory, the Webserver is started from.
> That's why there's a build(InputStream, String) method.

More information about the jdom-interest mailing list