Re: [dom3core] WRONG_DOCUMENT_ERR

On Dec 1, 2005, at 5:03 AM, Elliotte Harold wrote:

> Maciej Stachowiak wrote:
>
>> I'd like to request an erratum to make raising this exception  
>> optional. There does not seem to be much benefit to requiring DOM  
>> implementations to enforce this limit.
>
> This is a major change, not a minor erratum. It would impact a lot  
> of existing non-browser DOM implementations.

How would it impact existing implementations? I'm suggesting that  
throwing the exception would be optional - either throwing the  
exception or importing the node would be taken as conforming  
behavior. This will not require any changes of currently conforming  
implementations.

Nor would it require any change of conforming uses of the DOM API  
except in the highly unlikely case that they insert nodes into  
arbitrary documents and count on this exception to know if it was the  
right one.

> It is also unnecessary in DOM level 3 where there are methods to  
> import/adopt nodes into new documents.

It may be logically unnecessary, but it is currently impossible for a  
browser-based implementation to conform with the spec without  
breaking many web sites. I think loosening the spec to ALLOW but not  
REQUIRE the exception is preferrable to forcing such a tradeoff.

> While I tend to think that there probably shouldn't have been such  
> a restriction in DOM level 1 in the first place, I object to  
> changing it now via an erratum. This level of change requires a new  
> version of DOM, and in fact such a version already exists. There's  
> no need to rewrite history here.

I'd be fine with changing it in a DOM Level 3 erratum, but it would  
mean that a conforming DOM level 3 implementation might not be a DOM  
level 1 implementation. Better to isse an erratum for all DOM levels  
where this would apply.

Regards,
Maciej

Received on Friday, 2 December 2005 06:11:03 UTC