Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.1d1: setInternalDTDSubset

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] XOM 1.1d1: setInternalDTDSubset
  • Date: Sat, 08 Jan 2005 13:21:25 -0500

Wolfgang Hoschek wrote:

Plus you could move the "empty" static variable inside the method for improved clarity:

// private static InputSource empty;

static synchronized void checkInternalDTDSubset(String subset) {

if (parser == null) {
//empty = new InputSource(new EmptyReader());
final InputSource empty = new InputSource(new EmptyReader());
... and so on

Yes. It just didn't seem necessary to recreate that object on every pass through the method, though I'm sure it's not as heavyweight an operation as loading a parser.


--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page