ISSUE-2350 (unknown element fallback): Specify that unknown elements are treated as <g> elements for the purpose of rendering [SVG 2.0]

ISSUE-2350 (unknown element fallback): Specify that unknown elements are treated as <g> elements for the purpose of rendering [SVG 2.0]

http://www.w3.org/Graphics/SVG/WG/track/issues/2350

Raised by: Doug Schepers
On product: SVG 2.0

SVG 1.1 says, in http://www.w3.org/TR/2003/REC-SVG11-20030114/extend.html :
[[
23.1 Foreign namespaces and private data

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.)
]]

I think we should be more precise about this, and say that unknown elements are treated as <g> elements for the purpose of structure, rendering, and inheritance, and that their child elements still render.  This is an SVG extensibility point for new SVG elements (as well as other namespaced content), and would allow authors to define fallback content for the new element, per spec. 

For example, if we add a connector element, authors could also specify a simple path as a child, so that older UAs would still have something to render, even if it isn't as functional as the connector element.


<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     width="100%" height="100%" viewBox="0 0 400 400">

  <title>Unknown Element Test</title>

  <circle id="circle_1" cx="75" cy="25" r="20" fill="orange" stroke="red" />
  
  <g id="group_1" stroke="red">
    <circle id="circle_2" cx="175" cy="25" r="20" fill="orange" />
  </g>
  
  <foo id="foo_1" stroke="red">
    <circle id="circle_3" cx="275" cy="25" r="20" fill="orange" />
  </foo>
  
  <rect id="rect_1" x="355" y="5" width="40" height="40" fill="orange" stroke="blue">
    <circle id="circle_3" cx="375" cy="25" r="20" fill="orange" stroke="red" />
  </rect>
  
</svg>

Received on Thursday, 8 July 2010 22:15:36 UTC