[Bug 7510] Allow elements beyond just HTML, MathML, and SVG into SVG element

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


Shelley Powers <shelleyp@burningbird.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #17 from Shelley Powers <shelleyp@burningbird.net>  2009-09-23 01:58:28 ---
(In reply to comment #15)
> > Insert into the HTML5 specification:
> > 
> > The SVG specification states that namespaced elements not part of the SVG
> > specification, and not included in a foreignObject element should be ignored.
> > These namespaced elements will be ignored in HTML5. They are considered neither
> > conforming nor non-conforming from an HTML5 perspective.
> 
> I've added the following text:
> 
> "The SVG specification states that elements that are not in the SVG namespace,
> that are in SVG fragments, and that are not included in a foreignObject
> element, are to be ignored. Similarly, _this_ specification does not define any
> processing for elements in SVG fragments that are not in the HTML namespace;
> they are considered neither conforming nor non-conforming from the perspective
> of this specification."
> 
> I changed "namespaced elements" to "elements that are not in the SVG namespace"
> because all elements are namespaced elements.
> I added "that are in SVG fragments" because SVG doesn't make claims about
> elements outside of SVG fragments.
> I changed your second sentence to be more precise in its meaning; in
> particular, I don't want to imply that HTML elements can be used in SVG in
> manners that violate the rest of the HTML spec.
> I changed "HTML5" to "this specification" throughout to make future maintenance
> easier.
> 
> Please let me know if that's acceptable.
> 

I think it's a concern to paraphrase what the SVG spec says, because SVG could
change in the future. And if you don't use what's exactly in SVG, it could
create confusion. 

A better approach is to just make a statement deferring to the SVG
specification as regards to how foreign namespace elements and attributes are
handled. For instance, there may now be ambiguity in the specification as
regards to the foreign namespaced elements and attributes. 

SVG 1.1 has the following:

SVG allows inclusion of elements from foreign namespaces anywhere with the SVG
content. In general, the SVG user agent will include the unknown elements in
the DOM but will otherwise ignore unknown elements. (The notable exception is
described under Embedding Foreign Object Types.)

Additionally, SVG allows inclusion of attributes from foreign namespaces on any
SVG element. The SVG user agent will include unknown attributes in the DOM but
with otherwise ignore unknown attributes.

--

Your statement doesn't mention the DOM. It may seem like I'm picking nits, but
it was important to provide that additional information to ensure the elements
and attributes were picked up in the SVG DOM, and the same applies to SVG
within HTML. This may be stated elsewhere in the document, but I want to make
sure there's no confusion in this regard. 

Now, I am aware that when SVG is inline, there is no SVGDocument, the SVG
becomes part of the HTMLDocument. I know this means, in HTML, that the foreign
namespaced elements and attributes would be parsed as HTML. I am aware that
this means that the namespaces would not be parsed, and that attributes and
elements would become part of the SVG namespace, and their localnames would be
recorded in the DOM as "dc:foo".  I am not contesting this, in this bug. 

Other than these nits, I think we're very close to a equitable solution. I'm
sorry to have to reopen the bug, but it's the only way I know of to suggest an
additional edit.


-- 
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 Wednesday, 23 September 2009 01:58:38 UTC