Allow <use> to reference an entire document. (ACTION-3417)
--- a/master/changes.html Wed Feb 06 16:56:08 2013 +1100
+++ b/master/changes.html Wed Feb 06 17:17:02 2013 +1100
@@ -78,6 +78,8 @@
<li>Added the <a>'discard'</a> element and the <span class="attr-name">'timelineBegin'</span> and <span class="attr-name">'playbackOrder'</span> attributes on the <a>'svg'</a> element, as defined in SVG Tiny 1.2.</li>
<li>Added the ability to use <span class="attr-value">'auto'</span> for the <a>'image/x'</a> and <a>'image/y'</a> attributes on <a>'image'</a>.</li>
+
+ <li>Lifted the restriction on <a>'use'</a> not being able to reference an entire document.</li>
</ul>
<h3 id="styling">Styling chapter</h3>
--- a/master/struct.html Wed Feb 06 16:56:08 2013 +1100
+++ b/master/struct.html Wed Feb 06 17:17:02 2013 +1100
@@ -1075,6 +1075,27 @@
<h2 id="UseElement">The <span class='element-name'>'use'</span> element</h2>
+<div class="annotation svg2-requirement">
+ <table>
+ <tr>
+ <th>SVG 2 Requirement:</th>
+ <td>Allow <a>'use'</a> to reference an external document's root element by omitting the fragment.</td>
+ </tr>
+ <tr>
+ <th>Resolution:</th>
+ <td><a href="http://www.w3.org/2011/10/28-svg-irc#T00-33-43">We will relax referencing requirements to particular elements to allow dropping fragments to mean referencing root element, where it makes sense, such as with use, in SVG 2.</a></td>
+ </tr>
+ <tr>
+ <th>Purpose:</th>
+ <td>To avoid requiring authors to modify the referenced document to add an ID to the root element.</td>
+ </tr>
+ <tr>
+ <th>Owner:</th>
+ <td>Cameron (<a href="http://www.w3.org/Graphics/SVG/WG/track/actions/3417">ACTION-3417</a>)</td>
+ </tr>
+ </table>
+</div>
+
<edit:with element='use'>
<edit:elementsummary name='use'/>
@@ -1092,8 +1113,15 @@
objects, but the parameters of the template are limited – just
different inherited property values.</p>
-<p>Unlike <a>'image'</a>, the <a>'use'</a> element cannot reference
-entire files.</p>
+<div class="ready-for-wg-review">
+<p>The <a>'use'</a> element can reference an entire SVG document
+by specifying an <a>'xlink:href'</a> value without a fragment.
+Such references are taken to be referring to the root element
+of the referenced document.</p>
+
+<p class="note">This allows an entire SVG document to be referenced
+without having to ensure that it has an ID on its root element.</p>
+</div>
<p>The <a>'use'</a> element has
optional attributes <a>'use/x'</a>, <a>'use/y'</a>, <a>'use/width'</a> and <a>'use/height'</a> which are used to map the
@@ -1183,7 +1211,7 @@
element will be visible even if the <a>'use'</a> element specifies <span
class="prop-value">'visibility:hidden'</span>.</p>
-<p class="issue">Why is <a>'visibility'</a> called out speciically? It might
+<p class="issue">Why is <a>'visibility'</a> called out specially? It might
be better just to include an example that shows this.</p>
<p>Animations on a referenced element will cause the instances
@@ -1481,6 +1509,7 @@
separate document which generates its own parse tree and
document object model (if the resource is XML). Thus, there is
no inheritance of properties into the image.</p>
+
<p>Unlike <a>'use'</a>, the <a>'image'</a> element cannot reference
elements within an SVG file.</p>