W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: insertBefore within a Document ?

From: Don Park <donpark@quake.net>
Date: Fri, 16 Oct 1998 13:40:09 -0700
Message-ID: <019801bdf946$f430aea0$2ee044c6@arcot-main>
To: "www-dom" <www-dom@w3.org>

>I am getting into troubles with the methods insertBefore, appendChild, ...
>within a Document. If i append a node of type DOCUMENT_TYPE in a Document,
>this node have to be at least after the XMLDecl and before the ElementRoot.
>i have to force the place/index of this Node if i say
>Document.insertBefore(DTDNode, XMLDECLNode) or throws a DOMException ?

This is another grey area in the DOM spec.  Some implementations will force
you to insert at appropriate position and some will not care.  You should
protect yourself by inserting DocumentType into appropriate location.  Note
that there is also nothing about XMLDecl node.


Don Park
Received on Friday, 16 October 1998 16:53:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC