W3C home > Mailing lists > Public > www-svg@w3.org > June 2003

Re: SVG 1.2 11.4 Window Object

From: Chris Lilley <chris@w3.org>
Date: Sat, 7 Jun 2003 16:25:58 +0200
Message-ID: <196683607545.20030607162558@w3.org>
To: www-svg@w3.org, Tobias Reif <tobiasreif@pinkjuice.com>

On Wednesday, June 4, 2003, 11:37:26 AM, Tobias wrote:

TR> I just wanted to clarify that when Dean said that "any valid 
TR> serialisation is legal", the "valid" probably does not refer to the 
TR> validity of the serialized document in respect to a normative schema 
TR> (typical usage of "valid" when used in an XML context), but that Dean 
TR> probably referred to the soundness of the serialization process(es).

I think I understood what you meant; Dean probably meant well-formed,
not valid. So any well-formed serialisation would be okay, leaving to
the implementation such choices as

single or double quotes for attribute values
use of cr/lf
use of entities
empty elements as <foo/> or <foo></foo>
encoding
etc

TR> If someone constructs a document in memory, eg via the DOM and ECMA 
TR> Script, then it should get serialized as similiar as possible to that 
TR> document (DOM tree).

Yes. Of the variants given above, only use of cr/lf to give a readable
document might affect the resulting DOM if it was re-parsed 9the old
problem of blank text nodes being inserted on pretty print thus
messing up any script that counts siblings.

TR> (I'd prefer if this would be done in a predictable 
TR> way by all implementations, eg by following the same single standard or 
TR> other spec, and if options for pretty-printing were available.)

The only applicable spec seems to be canonical XML. I don't see that
it would be desirable i the general case to enforce all the
constraints there, though.

TR> If someone creates a graphic in an editor, he should be able to rely on 
TR> the software to ensure validity of the output, without changing the 
TR> graphic. But in the case where the user/developer constructs the 
TR> document itself, he wants that same document when getting it serialized.

Yes.

It could be defined in terms of round-tripping:

When a DOM is serialized, the result of parsing that re-serialisation
should be identical to the original DOM.

-- 
 Chris                            mailto:chris@w3.org
Received on Saturday, 7 June 2003 10:26:13 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:25 GMT