Re: The future of XML related technologies in Mozilla
Boris Zbarsky <[email protected]> Tue, 31 Oct 2006 19:49:07 -0600
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
Ian Hickson wrote: > HTML5 has document.innerHTML Only for HTMLDocument. > var d = document.implementation.createDocument(null, null, null); createDocument doesn't create an HTMLDocument, last I checked. In addition to which, for serialization purposes this is all patently insufficient without jumping through a _lot_ of hoops (one of the hoops being that innerHTML doesn't serialize the node in question, so the only way to do the equivalent of outerHTML is to import the subtree into a brand-new HTMLDocument, etc). Especially if, God forbid, you were to want to serialize SVG or MathML or some such. I also fully expect people to demand configurable serialization at some point. I think the default serializer should "do something sane" and there should be a way to configure it... One other note. For purposes of parsing HTML, it's not even clear what the right behavior for random fragments is (which is why the innerHTML does some whack things and one reason why DOMParser doesn't handle HTML). It'd be good to figure this out. -Boris