classpathx-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-discuss] EntityResolver problem with Aelfred parser


From: David Brownell
Subject: Re: [Classpathx-discuss] EntityResolver problem with Aelfred parser
Date: Wed, 14 Apr 2004 18:02:09 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Maarten Coene wrote:
Hi,

I have a problem with specifying an EntityResolver with the Aelfred SAXDriver. In some situations, the specified EntityResolver will not be used to resolve the entities. This can happen if you pass an InputSource to the SAXDriver.parse( ... ) method without specifying a systemId.

Passing such an InputSource is a bug in your application level
code.  Provide a base URI, and all SAX parsers should act the
same.  If you don't, there's no way to guess the right value;
and I don't know any "how to guess" convention that can won't
break in some environments.  (For a file, it might be $PWD.
For an HTTP URI, it might be something else entirely ...)
Which is why it doesn't guess, and reports that error.

If you really really want to make it harder to notice that kind
of application bug, don't just hide that guess ... make it an
explicit thing, at least by way of a "here's where we guess"
comment.  A settable parser property for the default value
would is the best option I've heard.

- Dave







reply via email to

[Prev in Thread] Current Thread [Next in Thread]