W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2003

DOM3 Core: DOMImplementationRegistry Behavior

From: Glenn A. Adams <glenn@xfsi.com>
Date: Thu, 19 Jun 2003 17:10:03 -0400
Message-ID: <7249D02C4D2DFD4D80F2E040E8CAF37C019991@longxuyen.xfsi.com>
To: <www-dom@w3.org>


The implementation of DOMImplementationRegistry shown in Appendix
G.1 makes use of a Java System Property to record a list of names
of classes that implement DOMImplementationSource. A user of the
registry may naturally infer that sources are
checked in the order specified by this property (and the order by
which additional sources are added to the registry using the
addSource() method). However, this may or may not be the case since
the implementation of DOMImplementationRegistry shown here makes
use of a Hashtable which does not guarantee any specific enumeration
order.

I would suggest doing one of the following:

1. abstract the definition of DOMImplementationRegistry in
Appendix G.1 to specify it in terms of an interface rather than
a class; furthermore, define its behavior more clearly in
terms of order of evaluation in the case that two or more
DOMImplementationSource instances implement the same features;

2. rewrite the implementation in G.1 to use an ordered
container type, such as a List;

3. specify that the behavior is undefined as to which
DOMImplementationSource will be returned when more than one
supports the same features.

Regards,
Glenn
Received on Thursday, 19 June 2003 17:10:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:57 GMT