Re: SVG 1.2 11.4 Window Object

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 UTC