[XML-SIG] foo.bar vs. foo.get_bar()

Ken MacLeod ken@bitsko.slc.ut.us
04 Nov 1999 21:01:09 -0600


"Fred L. Drake, Jr." <fdrake@acm.org> writes:

> uche.ogbuji@fourthought.com writes:
> 
>  > Yes, but a large part of the DOM REC can't be followed using pure
>  > attributes without __[g/s]etattr__.  I know that one can choose
>  > to implement subsets and approximations to the W3C DOM that don't
>  > run into such problems, but that doesn't suit everyone's needs.
>  > Some of us are looking for full DOM compliance, and that's why
>  > we're dealing with these issues.
> 
>   The W3C recommendation gives IDL, and there is a Python IDL
> binding.  The <obj>._get_<attr>() and <obj>._set_<attr>(<newvalue>)
> syntax I described is the result, and is (however ugly) conformant
> with the W3C DOM recommendation.

From those who understand the details of the DOM and CORBA specs it's
not clear to me yet that using attribute syntax is _not_ also
conformant (i.e. the Python IDL binding may have been unnecessarily
restricted).  The spec fragments from DOM and CORBA posted here both
seem to support and allow attribute syntax, as well as providing a
convention for languages that don't have attribute syntax or the
necessary internals.

>  I think I understand why the binding is the way it is, but I don't
> know if IDL attributes are intended to support updatable values.
> This would require digging around the CORBA spec a bit.

The DOM IDL uses a "readonly" declaration on some attributes, which
would seem to imply that if it weren't declared readonly then it would
be updatable or writable.

-- 
  Ken MacLeod
  ken@bitsko.slc.ut.us