Skip to content

Commit

Permalink
Make unknown elements render exactly as if they were a g element. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosandronikos committed Jun 14, 2016
1 parent 740addc commit a5a28a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion master/definitions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@

<!-- ... element categories ............................................ -->

<elementcategory name='container' href='struct.html#TermContainerElement' elements='svg, g, defs, symbol, clipPath, mask, pattern, marker, a, switch'/>
<elementcategory name='container' href='struct.html#TermContainerElement' elements='svg, g, defs, symbol, clipPath, mask, pattern, marker, a, switch, unknown'/>
<elementcategory name='descriptive' href='struct.html#TermDescriptiveElement' elements='desc, title, metadata'/>
<elementcategory name='gradient' href='pservers.html#TermGradientElement' elements='linearGradient, radialGradient, mesh'/>
<elementcategory name='graphics' href='struct.html#TermGraphicsElement' elements='path, text, rect, circle, ellipse, line, polyline, polygon, image, use, foreignObject, iframe, video, audio, canvas'/>
Expand Down
20 changes: 13 additions & 7 deletions master/struct.html
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,19 @@ <h2 id="UnknownElement">Unknown elements</h2>

<edit:elementsummary name='unknown'/>

<p>The <a>SVGUnknownElement</a> interface must be used for elements in the SVG namespace that are not defined by this specification.</p>
<p>Known elements in the SVG namespace that occur in places where SVG's content model doesn't explicitly allow it must not render.</p>
<p>Unknown elements in the SVG namespace render as if the unknown element was a <a>'g'</a> element.</p>
<p>Known and unknown elements in other namespaces that occur as a child of any SVG element except <a>'foreignObject'</a>, must not render unless
<p>Unknown elements are all elements that are in the SVG namespace that are not
defined by this specification or any SVG module. The <a>SVGUnknownElement</a>
interface must be used for unknown elements.</p>
<p>Known elements in the SVG namespace that occur in places where SVG's content
model doesn't explicitly allow it must not render.</p>
<p>Unknown elements in the SVG namespace must render as if the unknown element
were replaced with a <a>'g'</a> element. This means that any attribute or
property that is valid on the <a>'g'</a> element is also valid on unknown
elements, and any styles specified on unknown elements must be inherited by
their child elements. Unknown elements are <a>container elements</a>.
</p>
<p>Known and unknown elements in other namespaces that occur as a child of any
SVG element except <a>'foreignObject'</a>, must not render unless
explicitly stated otherwise in this specification.</p>

<p>Consequently, in the following example:</p>
Expand All @@ -369,9 +378,6 @@ <h2 id="UnknownElement">Unknown elements</h2>

<edit:example href='images/struct/unknownelms01.svg' image='no' link='yes'/>

<p class="issue" data-issue="64">Do we need to mention anything about attributes, properties and such on SVGUnknownElements?</p>
<p class="issue" data-issue="65">Should SVGUnknownElement be a <a>container element</a>?</p>

<h2 id="Head">Defining content for reuse, and the <span class='element-name'>'defs'</span> element</h2>

<h3 id="Overview">Overview</h3>
Expand Down

0 comments on commit a5a28a5

Please sign in to comment.