Re: when will serializing a document throw?

On Fri, Sep 20, 2013 at 8:34 AM, Hallvord Steen <hsteen@mozilla.com> wrote:
> Well, that may be the reason - and I'm not aware of any compat issues anyone has had in the past because of exceptions here. It still seems a bit suspect that all implementors have aligned perfectly on the spec-wise wrong behaviour. It also carries a bit of a risk to push for introducing new exceptions and make code that didn't throw historically change behaviour.

I'd be happy with different serialization rules for XML, although it
would be kind of sad if those rules generate something that does not
roundtrip. And ideally we do not have two XML serializers in the
platform. It's rare enough as it is. I suppose we could have a flag on
it for fatal vs non-fatal or something...

> Sort of.. but then again, I guess a completely empty string could be considered a valid representation of a completely empty document..? :-)

Not for an XML document. "data:text/xml," gets you a parse error.


-- 
http://annevankesteren.nl/

Received on Friday, 20 September 2013 12:52:02 UTC