DOM and inheritance

I was a little concerned about the models presented to the programmer in
the proposed DOM.
I sympathise with the need to provide an OO model with inheritance and a
flattened model. I am not sure however that the separation between the
two models is clean as it could be.
For example, the OO developer using the "element" interface does not
have access to a method to "getAttributes". For that, they are expected
to use the "non-OO" base interface "Node". I thought Node was supposed
to be the interface for non-OO developers. OO developers who are exposed
to this interface are faced with all manner of non-OO dilemmas - e.g.
"this method only applies if the node is representing _this_ type of
object." I don't beleive the developer who choses the OO model shoud
have to come into contact with a "dirty" interface like this.

When I was first getting up to speed with XML using the Microsoft Java
parsers they used a flattened model too and a colleague and I were both
set back by trying to invoke methods which were not applicable in
certain circumstances. I am sure this experience will be repeated by
other developers the world over if this approach is adopted.


Mark Harwood
Technical Architect
SSA Softwright Ltd
Langley Business Centre
Station Rd
Langley, Berks
SL3 8YT

Tel	 01753 811833
Fax	 01753 811834
Email     mharwood@softwright.co.uk

Received on Friday, 25 September 1998 11:08:38 UTC