Empty DocumentFragment when appended to DocumentType node throw DOMException or not ?

Hi 

DOM Level 2 specification  for DocumentFragment says that 
(see:http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3
<snip>
When a DocumentFragment is inserted into a Document (or indeed any other Node that may take children) the children of the 
DocumentFragment and not the DocumentFragment itself are inserted into the Node.
  the DocumentFragment acts as the parent of these nodes so that the user can use the standard methods from the Node interface, such as 
insertBefore and appendChild.
</snip>

and http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927):
 
<snip>  
    Interface DocumentType 
     ...
     The DOM Level 2 doesn't support editing DocumentType nodes.
     
</snip>     

that means appending any child node to DocmentType Node throws the DOMException "NO_MODIFICATION_ALLOWED_ERR : Raised if node is 
readonly".


Now,My Question is 

If  Empty DocumentFragment Node is appended to DocumentType Node , Should parser throw the DOM Exception "NO_MODIFICATIO_ALLOWED_ERR" ?

My reading to DOM Spec. says  _No_, parser should not throw the exception because when we  append the DocumentFragment Node to any other 
Node, children of Documnet Fragment are appended. So, When Empty DocumentFragment Node is appended, no attempt is made to add any node 
to DocumentType and DocumentType remain  unmodified. Xerces2 is not throwing exception in this case. 

What's ur opinion ? Do I mis-understand anything,  Please Clarify ?

Cheers,
Arun.

Sun Microsystem Inc.

Received on Wednesday, 3 April 2002 08:56:13 UTC