[XML-SIG] Ugh! Why are DOM access methods spelled with a leading '_'?

tpassin@home.com tpassin@home.com
Mon, 26 Jun 2000 12:05:13 -0400

I wrote -

>  Actually, the W3C DOM standard said that all the bindings were derived
> an underlying XML original:
> "As stated earlier, all object definitions are specified in XML. The Java
> bindings, OMG IDL bindings, and ECMA Script bindings are all generated
> automatically from the XML source code.
> This is possible because the information specified in XML is a superset of
> what these other syntax need. This is a general observation, and the same
> kind of technique can be applied to many other areas: given rich
> rich processing and conversion are possible. For Java and OMG IDL, it is
> basically just a matter of renaming syntactic keywords; for ECMA Script,
> process is somewhat more involved."
Just to clarify, this quote came from the non-normative appendix entitled
Production Notes in the level-1 DOM rec.

The Introduction in the rec does say

"In order to provide a precise, language-independent specification of the
DOM interfaces, we have chosen to define the specifications in OMG IDL, as
defined in the CORBA 2.2 specification."

For those who have posted being unhappy wth "attributes", the rec says

"Attributes defined in the IDL do not imply concrete objects which must have
specific data members - in the language bindings, they are translated to a
pair of get()/set() functions, not to a data member. (Read-only functions
have only a get() function in the language bindings).
DOM applications may provide additional interfaces and objects not found in
this specification and still be considered DOM compliant."

I have always thought that this requires the Python binding to use functions
like get...().  But I suppose it's not really clear.  For example, the IDL
in the rec for Node says that nodeValue is an "attribute" of Node.  The
ECMAScript binding does not show a Node.setnodeValue() method.  Presumably,
though, it is implied that there should be one, for there is no other way
specified to set the value.  So I would think that the Python method should
have the same name.

But it seems that wiser heads than mine have already settled this.

Tom Passin