Re: Highlighting issue of XML support in DOM 4 (was: TAG Decision .....develop a polyglot guide)

On Tue, Jan 22, 2013 at 4:11 PM, Noah Mendelsohn <nrm@arcanedomain.com> wrote:
> Should we push on the DOM WG to change?

I think the TAG should not push for change in this case. The XML
declaration is not part of the logical content of the document. It is
a serialization artifact. After the parsing phase, applications should
not alter their treatment of an XML document based on what was in the
XML declaration. In that sense, the stuff from the XML declaration
does not belong in the data model.

As for putting the stuff from the XML declaration into the data model
in order to support editors that want to be able to round trip source
text instead of just re-serializing the logical contents of the
document, I think using the DOM is already inadequate for such source
round tripping for other reasons. For example, the DOM doesn't store
information about white space between attributes, whitespace around
the equals sign in attribute syntax or whether single or double quotes
were used around the attribute value. For better or worse, BlueGriffon
is a DOM-based editor, so it won't be able to round-trip source text.
I think we shouldn't add/keep warts in the DOM to allow slightly more
source round tripping in BlueGriffon when it's clear that the DOM
isn't going to support full source round tripping anyway.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Tuesday, 22 January 2013 14:22:44 UTC