From: "Andy Clark" <[EMAIL PROTECTED]> > Elena Litani wrote: > > This is interesting.. DOM L2 states that doctype is readonly: > > "...The DOM Level 2 does not support editing the Document Type > > Declaration. docType cannot be altered in any way, including through the > > use of methods inherited from the Node interface, such as insertNode or > > removeNode." > > You're right but I think that the text you're referring to > is ambiguous. It sounds like I can't use those methods on > the doctype node. However, the IDL in the spec clearly > states that the doctype node is a readonly field. However, > the IDL shows that the document root element is also a > readonly field. This would seem to indicate that you can > never construct an empty document even though that's > clearly what people want and need to do.
I think you've slipped away from Elana's point. It's not that you can't create a new, empty document with a docType of your own making (an important use case), and it's not that you can't import nodes from an existing document to the new document, it's that you can't change the docType of an existing document. At the very best, such an operation would be non-portable. Bob Foster WebGain > -- > Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]