Re: XML APIs

>I would be satisfied with a simple phrase to the effect that
>``the behavior of an iterator under changes of document structure
>may be undefined in some implementations.''

That could be simplified to "is undefined" -- if it's implementation
dependent, it's implementation dependent and that's the end of it. "It
might or might not behave this particular way" probably belongs in the
tutorial, or in the docs for a particular implementation, rather than the
spec itself.

I too would be content with that answer. Or preferably with a slight
refinement saying that editing or relocating the iterator's last-viewed
node will have unpredictable effects, since other changes to the document
are relatively easy to handle... and in fact may not require any
special-casing at all if the iterator works purely in terms of tree
navigation and the current state of the DOM at the moment we ask it for the
next matching node.

But if we can find a way to _inexpensively_ guard the user against stubbing
their toe, or at least inform them of what they banged into, so they can
more easily fix their code to not do it again, I think that's worth
considering.

______________________________________
Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.

Received on Tuesday, 3 November 1998 16:22:55 UTC