Re: Highlighting issue of XML support in DOM 4

Henri Sivonen <hsivonen@iki.fi> writes:
> 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.

I take a largely fatalistic view of XML support in browsers these
days, but it seems to me that whether or not the document was parsed
as XML is a relevant bit of information, even if the DOM discards all
the parts of XML it doesn't like.

Knowing that the document was XML, and that, consequently, you might
want to serialize it as XML, is probably the only bit that's
necessary.

As Henri observes in another message, the version is moot, the code
performing serialization can decide if it's generating a standalone
document or not, and the encoding will be UTF-8 if the serializer
has any sense.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 512 761 6676
www.marklogic.com

Received on Tuesday, 22 January 2013 15:32:39 UTC