Re: setEntityResolver(null)

Miles Sabin <[email protected]> Wed, 2 Apr 2003 15:57:39 +0100
Newsgroups gmane.text.xml.sax.devel
Message-ID <[email protected]>
Karl Waclawek wrote,
> getEntityResolver returns Null, if setEntityRresolver was never
> invoked.

Right, and the spec says it returns,

  The current entity resolver, or null if none has been registered.

which doesn't say that null _is_ the default entity resolver, only that 
a return value of null _indicates_ that the current entity resolver is 
the default.

OK, I accept that this sounds like I'm nitpicking, and I agree that 
given the defn of getEntityResolver it'd be reasonable to have a null 
arg to setEntityResolver reset the resolver to the default.

But this needs to be flagged up explicitly in the Javadoc for 
setEntityResolver. And we ought to say what the default policy actually 
_is_. DefaultHandler defines a policy reasonably clearly, but that 
doesn't tell us what the default behaviour is if setEntityResolver is 
never invoked ... it's _probably_ the same as the behaviour of 
DefaultHandler in almost all implementations, but there's nothing in 
the spec that requires this.

Cheers,


Miles


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
List: sax-devel, [email protected]
See:  http://www.saxproject.org/
https://lists.sourceforge.net/lists/listinfo/sax-devel