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: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] XOM 1.1d1: setInternalDTDSubset
  • Date: Mon, 17 Jan 2005 13:22:17 -0800


It doesn't occur in my use cases, but if one had an app that exchanges many identically formed small XML protocol messages and that app happened to use internal DTD subsets it would take a large hit. So more immediately useful than a ThreadLocal is a small string cache similar in spirit to Verifier.URICache. I think that should eliminate problems for all but bizarre use cases. Checking for a cache hit with == doesn't make much sense here; one needs to check with equals(). I think keeping the same cache size (6) is just fine.

This would on;y help if the internal DTD subsets, and therefore likely the whole DocTypes were the same across many messages.

Sure, but if there's a common case, that's the one.

In this case (frequent reuse of the same DTD) you could just make one DocType and keep copying it with the copy constructor, which bypasses the check, I should probably add a note about this (and similar techniques) to the FAQ.


Sure, by why have the user figure out a non-obvious trick the hard way?

Wolfgang.





Archive powered by MHonArc 2.6.24.

Top of Page