Re: DOM and Xptrs

At 10:32 AM 8/6/98 -0700, Ted Bashor wrote:

>I was wondering if someone could comment on the relationship of the
>current DOM API and the XPointer spec.

It must be possible to implement XPointers on top of the DOM. That does not
mean that the DOM has to provide an XPointer API. And certainly not in
Level 1!

>I was sort of expecting that the DOM, in particular its ECMA script
>bindings, would include accessor methods like 
>an_element.child(2, "foo"), etc.

Personally, I might prefer to have a function that executes an entire
XPointer - I see no point to having the ECMA masquerade as XPointers when
XPointer notation can do that itself. If I were to implement something like
this, I might prefer something like this:

  this_node=that_node.traverse("child(3,DIV1).child(4,DIV2).child(29,P)");

The Java or ECMA script code need not mimic the structure of the XPointer
syntax, it can just use it as a parameter. But we're not working on that.

>Was this not done because A) not enough time B) it doesn't belong in
>level 1 C) the XPointer api sucks D) the XPointer api is expected to
>change E) other?

We've been working on other things. XPointer is a lower priority than the
things we've managed to finish so far.

Jonathan
 
jonathan@texcel.no
Texcel Research
http://www.texcel.no

Received on Thursday, 6 August 1998 16:20:11 UTC