W3C home > Mailing lists > Public > www-svg@w3.org > April 2010

Re: xlink:href test case

From: Robin Berjon <robin@berjon.com>
Date: Tue, 20 Apr 2010 12:27:31 +0200
Cc: Anne van Kesteren <annevk@opera.com>, www-svg WG <www-svg@w3.org>
Message-Id: <D1952DAA-DF45-468F-BDA2-941E8BCE795F@berjon.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
On Apr 17, 2010, at 04:14 , Boris Zbarsky wrote:
> On 4/16/10 4:32 AM, Robin Berjon wrote:
>> I'm okay with the first, but the second is a problem because if the prefix is unbound the document cannot then be serialised to XML.
> Why is this an issue?  It's trivial to construct DOMs using setAttributeNS that can't be serialized as XML without fixup.  Actual serializers in browsers munge namespace prefixes as needed to produce well-formed XML that will at least end up with the same localNames and namespaces; prefixes are not considered something that has to round-trip (though it's nice when they do, and serializers try to preserve them when possible).

I know, and I don't see that as a killer issue since there are several other ways of creating DOMs that can't be serialised (or require munging)  I just think that it ought to be avoided when avoidable.

>>   - if there is no such attribute, but there is a namespace in scope for prefix "foo", then a foo:bar attribute is created with that prefix and that namespace
> This isn't compatible with what UAs do now, last I checked.  Are we sure this won't break sites?

This is naturally provisional on UA alignment  I thought that this would go without saying :) But the OP indicated that he wasn't seeing interoperable results anyway (though that might be due to other problems).

>>   - if there is no such attribute and no matching namespace in scope, a "bar" attribute is created, with no prefix and in no namespace
> This will _definitely_ break sites if applied to HTML.

Yeah, I was concerned that that might be the case.

Either way, if we keep going this should probably move to www-dom :)

Robin Berjon - http://berjon.com/
Received on Tuesday, 20 April 2010 10:28:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:26 UTC