W3C home > Mailing lists > Public > www-svg@w3.org > March 2009

Re: View Source

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Tue, 17 Mar 2009 16:14:02 +0100
Message-ID: <49BFBE3A.5090608@lachy.id.au>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: www-svg@w3.org, public-html@w3.org
Boris Zbarsky wrote:
> Lachlan Hunt wrote:
>> Are you asking for the spec to more thoroughly define how to serialise 
>> a given DOM in a way that guarantees well-formedness, even in such 
>> cases where that can't be done losslessly?  There are some DOMs that 
>> can be produced by text/html which simply cannot be represented in 
>> well-formed XML documents, so such things would need to be modified in 
>> some way.
> 
> For what it's worth, such DOMs can also be produced via the DOM APIs, 
> once namespaces are involved.  Most simply, stick an attribute with the 
> local name "xmlns" and the null namespace onto an element.

That doesn't round-trip losslessly, but simply serialising it as <foo 
xmlns="..."> doesn't result in a well-formedness error.  I was thinking 
about things that cause well formedness errors, such as comments 
containing extra pairs of hyphens (<!-- foo -- bar -->), or attribute 
names containing characters that aren't allowed in XML (<p #="">), etc.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Tuesday, 17 March 2009 15:14:41 GMT

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