[Bug 11099] clarify that "element's tag name" and "attribute's name" are qualified name

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11099

--- Comment #11 from Cameron McCormack <cam@mcc.id.au> 2010-10-30 01:04:07 UTC ---
(In reply to comment #10)
> As I said, that creates theoretical problems for attributes that already have
> the xlink prefix. When setting SVG namespaced attributes in the HTML DOM just
> make sure they have the right prefix.

I don't think it should be required to use the right prefix when calling
setAttributeNS.  I think many people do
setAttribute("http://www.w3.org/1999/xlink", "href", "blah").

I don't think we should care too much about attributes set using the "xlink"
prefix but not the XLink namespace; this issue is all about choosing where to
break roundtripability.  My suggestion:

  * Known attributes in the XLink, XML and XMLNS namespaces get serialized
    such that they will round trip correctly when being parsed again -- i.e.,
    they will be serialized using "xlink", "xml" and "xmlns" prefixes.  (Except
    for xmlns="" of course.)

  * All other attributes in a namespace get serialized just as their qualified
    name.  If this qualified name matches one of the known attribute
(regardless
    of whether it was specified on the element), then don't serialize it.
    (Optional design decision: If the qualified name had no prefix, also don't
    serialize it.  If not, then run the simply allow the possibility of
    identically named attributes when serializing an element.)

That seems simpler than defining a way for the troublesome attributes to be
serialized by munging their names somehow.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Saturday, 30 October 2010 01:04:10 UTC