W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2002

Re: Level 3 Core comments

From: Fred L. Drake, Jr. <fdrake@acm.org>
Date: Mon, 28 Oct 2002 17:00:21 -0500
Message-ID: <15805.45941.140575.443452@grendel.zope.com>
To: www-dom@w3.org


Last August, I sent a note to this list with a variety of comments on
the DOM Level 3 Core draft (the 9 April 2002 draft):

http://lists.w3.org/Archives/Public/www-dom/2002JulSep/0049.html

Naturally, I never received a response (which was not a surprise), but
I've noticed that not even the most trivial typos were corrected in
the 22 October 2002 draft.

Does the WG read this list, or am I wasting my time in reviewing the
drafts of these specifications?  I can understand that any actual
decisions can take a long time when work is done by committee, but I
do expect the editor can deal with typos.  I'd also expect that the
issues raised be recorded in the little lists of issues distributed
throughout the document.  Perhaps I misunderstand how the W3C goes
about it's work?

Just in case, I'll try another comment, this one more about the
flexibility of specific bindings.

The Python DOM binding provides a function getDOMImplementation()
which takes the name of a DOM or feature information (it can be called
either way), and returns a DOMImplementation object.  The feature
information is not expressed as a simple string but as a structured
value.

This function was defined separately from the DOM drafts as our
bootstrap mechanism (Feb 2001), but the name is identical.

This function would normally be called in one of these ways:

    from xml.dom import getDOMImplementation

    # get anything available
    dom = getDOMImplementation()

    # get the low-memory (hah!) implementation
    dom = getDOMImplementation("xml.dom.minidom")

    # get a DOM with specific features
    dom = getDOMImplementation(features=[("ls-load", "3.0"),
                                         ("xml", "2.0")])

I've added this to our reference implementation to come a little
closer to the current draft:

    # get a DOM with specific features
    dom = getDOMImplementation(features="ls-load 3.0 xml 2.0")

Note that passing a single string as an anonymous argument doesn't
work, since that is interpreted as the name of a specific
implementation.  This variant would be equivalent to the previous
call:

    dom = getDOMImplementation(None, "ls-load 3.0 xml 2.0")

Another difference is perhaps more important:  If there is no suitable
implementation, getDOMImplementation() raises a Python ImportError
exception (this is a standard Python exception, not something created
specifically for the DOM).

Now for my question:  In defining the binding, is it reasonable to
simply declare that this is close enough?  I'm very disinclined to
provide a separate object to server as a DOMImplementationSource and
change the argument list slightly -- having two methods with the same
name and functionality but different signatures seems a bit
rediculous, and I don't think we can really change the existing
bootstrap interface since there's too much legacy code.

Comments?


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation
Received on Monday, 28 October 2002 17:00:59 GMT

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