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>
Pat,

>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.
Do
>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.

Best,

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT