[jdom-interest] performance on tonights CVS

Jason Hunter jhunter at acm.org
Fri Mar 15 17:44:40 PST 2002


> >I've been brainstorming with Brad about how to work around this so
> >there's no verification when using a parser.  Sadly with the package
> >breakout it's not easy.  It wasn't easy a year ago when we first faced
> >this.
> >
> 
> Would it be possible to make a package protected non-verifying
> subclass of Text in org.jdom.input that could be used by SAXBuilder,
> etc? To everything outside the org.jdom.input package this would just
> be a Text object. Is it possible to subclass a public class with a
> non-public class? Even if it has to be public, such a class still
> might make sense.
> 
> Also, keep in mind that not all parsers make all the checks they're
> supposed to. For instance, AElfred will not catch some illegal
> characters in names.

My best brainstorm is to move JDOMFactory and DefaultJDOMFactory into
org.jdom.  It's arguably appropriate, since they can build document
components anytime, not only during the input phase.  We add a
NonVerifyingJDOMFactory which uses package-protected constructors to
build objects without verification.  Parsers use that factory by
default.  It builds the same classes as always, but skips the Verifier
calls.  Other people who know what they're doing can use the factory
also, but they'll be the experts knowing what they're doing.  

-jh-



More information about the jdom-interest mailing list