Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] QName flyweights

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: norwoods <norwoods AT gbronline.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] QName flyweights
  • Date: Mon, 13 Jun 2005 13:13:39 -0700

As far as I can see (and I've seen no explanation or solid argument to the contrary) these trial impls have no merit at all, not in time, not in space, not in robustness, compactness, or in any other way. Feel free to make a convincing case, but please, to safe everyone's time, preferably after you've actually run those through a solid test and benchmark harness.

Plus, as I said it's a *bug* to put a QName into the cache before it has been determined that it lexiaclly conforms to the XML spec. Subsequent get() are not checked because the assumption is that whatever is in the cache has been checked previously, ensuring one cannot get non-XML nonsense from the cache.

Wolfgang.

On Jun 13, 2005, at 1:03 PM, norwoods wrote:

i would like to try a least the cases of a cache for all QNames as in QName2 and a possibly partial cache as in your proposal implemented in QName4. i do not check validity in these implementations because they are synchronized and validity checking can be done out of sync.

norwood sisson

Wolfgang Hoschek wrote:


I have no idea what you're trying to achieve with all those trials beyond what I proposed.

Also you seem to ignore lexical and semantic XML QName checking. If you take that into account then QName, the cache, and its usage should be separted rather than intermingled. The last thing anyone wants is to get() a QName from a cache that does not conform to the XML spec (since it has been put() into the cache before checking it). Also note that QName.intern() and the lexical checks are not always necessary, for example consider Element.build() as called from a NonVerifyingXOMHandler.

Wolfgang.

On Jun 13, 2005, at 12:27 PM, norwoods wrote:


here is another attempt at a cache. this uses an LRUCache. it can return a QName object with the methods qName=QName3.newQName (name, uri); or qName=QName3.newQName(QName3.qualifyName (prefix, localName), uri);









Archive powered by MHonArc 2.6.24.

Top of Page