W3C home > Mailing lists > Public > www-tag@w3.org > January 2013

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

From: Henri Sivonen <hsivonen@iki.fi>
Date: Tue, 22 Jan 2013 16:22:14 +0200
Message-ID: <CAJQvAucb1vNr=T_dQzub27NhZJf_q4xPuvwA5wqyzp0R=33RbQ@mail.gmail.com>
To: Noah Mendelsohn <nrm@arcanedomain.com>
Cc: "www-tag@w3.org" <www-tag@w3.org>, Daniel Glazman <daniel@glazman.org>, Norm Walsh <ndw@nwalsh.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 January 2013 14:22:44 GMT