Allow marker properties to refer to target marker element by child keyword or child-selector (ACTION-3322)
authorBrian Birtles <birtles@gmail.com>
Fri, 01 Mar 2013 14:45:53 +0900
changeset 443 d79cd4e1ae6f
parent 442 8964168f477f
child 444 f20abe618367
Allow marker properties to refer to target marker element by child keyword or child-selector (ACTION-3322)
master/definitions.xml
master/painting.html
--- a/master/definitions.xml	Fri Mar 01 14:04:50 2013 +0900
+++ b/master/definitions.xml	Fri Mar 01 14:45:53 2013 +0900
@@ -106,7 +106,7 @@
       href='shapes.html#CircleElement'
       contentmodel='anyof'
       elementcategories='animation, descriptive, paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='aria, conditional processing, core, graphical event, presentation, style'
       interfaces='SVGCircleElement'>
     <attribute name='cx' href='shapes.html#CircleElementCXAttribute' animatable='yes'/>
@@ -119,7 +119,7 @@
       href='masking.html#ClipPathElement'
       contentmodel='anyof'
       elementcategories='descriptive, animation, shape, paint server'
-      elements='text, use, clipPath'
+      elements='text, use, clipPath, marker'
       attributecategories='core, presentation, style'
       interfaces='SVGClipPathElement'>
     <attribute name='clipPathUnits' elements='clipPath' href='masking.html#ClipPathElementClipPathUnitsAttribute' animatable='yes'/>
@@ -181,7 +181,7 @@
       href='shapes.html#EllipseElement'
       contentmodel='anyof'
       elementcategories='animation, descriptive, paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='aria, conditional processing, core, graphical event, presentation, style' 
       interfaces='SVGEllipseElement'>
     <attribute name='cx' href='shapes.html#EllipseElementCXAttribute' animatable='yes'/>
@@ -195,7 +195,7 @@
       href='fonts.html#FontElement'
       contentmodel='anyof'
       elementcategories='descriptive, paint server'
-      elements='font-face, missing-glyph, glyph, hkern, vkern, mask, clipPath'
+      elements='font-face, missing-glyph, glyph, hkern, vkern, mask, clipPath, marker'
       attributecategories='core, style, presentation'
       interfaces='SVGFontElement'>
     <attribute name='horiz-origin-x' href='fonts.html#FontElementHorizOriginXAttribute'/>
@@ -322,7 +322,7 @@
       name='glyphRef'
       href='text.html#GlyphRefElement'
       elementcategories='paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='core, style, presentation, xlink'
       interfaces='SVGGlyphRefElement'>
     <attribute name='x' href='text.html#GlyphRefElementXAttribute'/>
@@ -346,7 +346,7 @@
       href='struct.html#ImageElement'
       contentmodel='anyof'
       elementcategories='animation, descriptive, paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='aria, core, conditional processing, graphical event, style, xlink, presentation'
       attributes='preserveAspectRatio'
       interfaces='SVGImageElement'>
@@ -362,7 +362,7 @@
       href='shapes.html#LineElement'
       contentmodel='anyof'
       elementcategories='animation, descriptive, paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='aria, conditional processing, core, graphical event, presentation, style'
       interfaces='SVGLineElement'>
     <attribute name='x1' href='shapes.html#LineElementX1Attribute' animatable='yes'/>
@@ -492,7 +492,7 @@
       href='paths.html#PathElement'
       contentmodel='anyof'
       elementcategories='animation, descriptive, paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='aria, conditional processing, core, graphical event, presentation, style'
       interfaces='SVGPathElement'>
     <attribute name='d' href='paths.html#DAttribute' animatable='yes'/>
@@ -523,7 +523,7 @@
       href='shapes.html#PolygonElement'
       contentmodel='anyof'
       elementcategories='animation, descriptive, paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='aria, conditional processing, core, graphical event, presentation, style'
       interfaces='SVGPolygonElement'>
     <attribute name='points' href='shapes.html#PolygonElementPointsAttribute' animatable='yes'/>
@@ -534,7 +534,7 @@
       href='shapes.html#PolylineElement'
       contentmodel='anyof'
       elementcategories='animation, descriptive, paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='aria, conditional processing, core, graphical event, presentation, style'
       interfaces='SVGPolylineElement'>
     <attribute name='points' href='shapes.html#PolylineElementPointsAttribute' animatable='yes'/>
@@ -565,7 +565,7 @@
       href='shapes.html#RectElement'
       contentmodel='anyof'
       elementcategories='animation, descriptive, paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='aria, conditional processing, core, graphical event, presentation, style'
       interfaces='SVGRectElement'>
     <attribute name='x' href='shapes.html#RectElementXAttribute' animatable='yes'/>
@@ -653,7 +653,7 @@
     href='struct.html#SwitchElement'
     contentmodel='anyof'
     elementcategories='animation, descriptive, shape, paint server'
-    elements='svg, g, use, text, image, a, foreignObject, switch, mask, clipPath'
+    elements='svg, g, use, text, image, a, foreignObject, switch, mask, clipPath, marker'
     attributecategories='aria, conditional processing, core, graphical event, presentation, style'
     interfaces='SVGSwitchElement'/>
 
@@ -672,7 +672,7 @@
       href='text.html#TextElement'
       contentmodel='textoranyof'
       elementcategories='animation, descriptive, text content child, paint server'
-      elements='a, mask, clipPath'
+      elements='a, mask, clipPath, marker'
       attributecategories='aria, conditional processing, core, graphical event, presentation, style'
       attributes='lengthAdjust'
       interfaces='SVGTextElement'>
@@ -690,7 +690,7 @@
       href='text.html#TextPathElement'
       contentmodel='textoranyof'
       elementcategories='descriptive, paint server'
-      elements='animate, animateColor, a, set, tspan, tref, altGlyph, mask, clipPath'
+      elements='animate, animateColor, a, set, tspan, tref, altGlyph, mask, clipPath, marker'
       attributecategories='aria, conditional processing, core, graphical event, presentation, style, xlink'
       attributes='lengthAdjust, textLength'
       interfaces='SVGTextPathElement'>
@@ -735,7 +735,7 @@
       href='struct.html#UseElement'
       contentmodel='anyof'
       elementcategories='animation, descriptive, paint server'
-      elements='mask, clipPath'
+      elements='mask, clipPath, marker'
       attributecategories='aria, core, conditional processing, graphical event, presentation, style, xlink'
       interfaces='SVGUseElement'>
     <attribute name='x' href='struct.html#UseElementXAttribute' animatable='yes'/>
@@ -1210,6 +1210,7 @@
   <symbol name='list' href='types.html#DataTypeList'/>
   <symbol name='list-of-family-names' href='types.html#DataTypeListOfFamilyNames'/>
   <symbol name='list-of-strings' href='types.html#DataTypeListOfStrings'/>
+  <symbol name='marker-ref' href='types.html#DataTypeMarkerRef'/>
   <symbol name='mask-source' href='masking.html#DataTypeMaskSource'/>
   <symbol name="name" href="types.html#DataTypeName"></symbol>
   <symbol name='number' href='types.html#DataTypeNumber'/>
--- a/master/painting.html	Fri Mar 01 14:04:50 2013 +0900
+++ b/master/painting.html	Fri Mar 01 14:45:53 2013 +0900
@@ -2245,6 +2245,45 @@
   </div>
 </div>
 
+<h3 id="MarkerReferences">Referencing <a>'marker element'</a> elements</h3>
+
+<p>A number of marker properties allow specifying a <a>'marker element'</a> using a <a>&lt;marker-ref&gt;</a> value.</p>
+
+<div class="definition">
+  <dfn id="DataTypeMarkerRef">&lt;marker-ref&gt;</dfn> =<br/>
+  <div style="margin-left: 2em">
+    none |<br/>
+    <a>&lt;funciri&gt;</a> |<br/>
+    child |<br/>
+    <a>&lt;child-selector&gt;</a>
+  </div>
+</div>
+
+<p>Values have the following meaning</p>
+
+<dl>
+  <dt><span class='prop-value'>&lt;funciri&gt;</span></dt>
+  <dd>Indicates that the <a>'marker element'</a> element referenced
+  by the <a>&lt;funciri&gt;</a> value will be used.
+  If the <a href="linking.html#IRIReference">IRI reference</a> is not valid
+  (e.g., it points to an object that is undefined or the object is not
+  a <a>'marker element'</a> element), then the marker reference is also not
+  valid.</dd>
+
+  <dt><span class='prop-value'>child</span></dt>
+  <dd>Indicates that the last child <a>'marker element'</a> element of the
+  element where the property is specified will be used.
+  If there is no such element, then the reference is not valid.</dd>
+
+  <dt><span class='prop-value'>&lt;child-selector&gt;</span></dt>
+  <dd>Indicates that the first matching descendent <a>'marker element'</a>
+  specified by the <a>&lt;child-selector&gt;</a>, applied in the context of the
+  element where the property is specified, will be used.
+  If no element matches any of the selectors contained in the
+  <a>&lt;child-selector&gt;</a>, or the first match is not a <a>'marker
+  element'</a>, then the reference is not valid.</dd>
+</dl>
+
 <h3 id="VertexMarkerProperties">Vertex markers: the <span class="property">'marker-start'</span>,
 <span class="property">'marker-mid'</span> and <span class="property">'marker-end'</span>
 properties</h3>
@@ -2258,7 +2297,7 @@
   </tr>
   <tr>
     <th>Value:</th>
-    <td>none | <a>&lt;funciri&gt;</a></td>
+    <td>none | <a>&lt;marker-ref&gt;</a></td>
   </tr>
   <tr>
     <th>Initial:</th>
@@ -2282,7 +2321,8 @@
   </tr>
   <tr>
     <th>Computed&#160;value:</th>
-    <td>as specified, but with <a>&lt;funciri&gt;</a> values made absolute</td>
+    <td>as specified, but with <a>&lt;funciri&gt;</a> values (that are part of
+    a <a>&lt;marker-ref&gt;</a>) made absolute</td>
   </tr>
   <tr>
     <th><a>Animatable</a>:</th>
@@ -2303,14 +2343,12 @@
   <dd>Indicates that no marker symbol will be drawn at the given
   vertex or vertices.</dd>
 
-  <dt><span class='prop-value'>&lt;funciri&gt;</span></dt>
+  <dt><span class='prop-value'>&lt;marker-ref&gt;</span></dt>
   <dd>Indicates that the <a>'marker element'</a> element referenced
-  by the <a>&lt;funciri&gt;</a> value will be drawn at the given
-  vertex or vertices.  If the
-  <a href="linking.html#IRIReference">IRI reference</a> is not valid (e.g.,
-  it points to an object that is undefined or the object is not a
-  <a>'marker element'</a> element), then no marker will be drawn
-  at the given vertex or vertices.</dd>
+  by the <a>&lt;marker-ref&gt;</a> value will be drawn at the given vertex or
+  vertices.
+  If the reference is not valid, then no marker will be drawn at the given
+  vertex or vertices.</dd>
 </dl>
 
 <p>For <a>'polygon'</a> elements, the last vertex is the same as the first
@@ -2351,7 +2389,7 @@
   </tr>
   <tr>
     <th>Value:</th>
-    <td>none | <a>&lt;funciri&gt;</a></td>
+    <td>none | <a>&lt;marker-ref&gt;</a></td>
   </tr>
   <tr>
     <th>Initial:</th>
@@ -2375,7 +2413,8 @@
   </tr>
   <tr>
     <th>Computed&#160;value:</th>
-    <td>as specified, but with <a>&lt;funciri&gt;</a> values made absolute</td>
+    <td>as specified, but with <a>&lt;funciri&gt;</a> values (that are part of
+    a <a>&lt;marker-ref&gt;</a>) made absolute</td>
   </tr>
   <tr>
     <th><a>Animatable</a>:</th>
@@ -2395,14 +2434,12 @@
   <dd>Indicates that no marker symbol will be drawn at the given
   vertex or vertices.</dd>
 
-  <dt><span class='prop-value'>&lt;funciri&gt;</span></dt>
+  <dt><span class='prop-value'>&lt;marker-ref&gt;</span></dt>
   <dd>Indicates that the <a>'marker element'</a> element referenced
-  by the <a>&lt;funciri&gt;</a> value will be drawn at the center
-  of each path segment.  If the
-  <a href="linking.html#IRIReference">IRI reference</a> is not valid (e.g.,
-  it points to an object that is undefined or the object is not a
-  <a>'marker element'</a> element), then no marker will be drawn
-  at the path segment centers.</dd>
+  by the <a>&lt;marker-ref&gt;</a> value will be drawn at the center
+  of each path segment.
+  If the reference is not valid, then no marker will be drawn at the path
+  segment centers.</dd>
 </dl>
 
 <div class="example">
@@ -2454,7 +2491,7 @@
   </tr>
   <tr>
     <th>Value:</th>
-    <td>[ none | <a>&lt;length&gt;</a> | <a>&lt;percentage&gt;</a> | <a>&lt;funciri&gt;</a> ]+</td>
+    <td>[ none | <a>&lt;length&gt;</a> | <a>&lt;percentage&gt;</a> | <a>&lt;marker-ref&gt;</a> ]+</td>
   </tr>
   <tr>
     <th>Initial:</th>
@@ -2478,7 +2515,8 @@
   </tr>
   <tr>
     <th>Computed&#160;value:</th>
-    <td>as specified, but with <a>&lt;funciri&gt;</a> values made absolute</td>
+    <td>as specified, but with <a>&lt;funciri&gt;</a> values (that are part of
+    a <a>&lt;marker-ref&gt;</a>) made absolute</td>
   </tr>
   <tr>
     <th><a>Animatable</a>:</th>
@@ -2503,13 +2541,11 @@
   <dd>Indicates the length of a gap in the repeated
   pattern of markers.</dd>
 
-  <dt><span class="prop-value"><a>&lt;funciri&gt;</a></span></dt>
+  <dt><span class="prop-value"><a>&lt;marker-ref&gt;</a></span></dt>
   <dd>A reference to a <a>'marker element'</a> that will be
-  placed at the current position along the path.  If the
-  <a href="linking.html#IRIReference">IRI reference</a> is not valid (e.g.,
-  it points to an object that is undefined or the object is not a
-  <a>'marker element'</a> element), then no marker will be drawn
-  at the current position.</dd>
+  placed at the current position along the path.
+  If the reference is not valid, then no marker will be drawn at the
+  current position.</dd>
 </dl>
 
 <p>If a value other than <span class="prop-value">none</span> is given,
@@ -2568,11 +2604,11 @@
     <th>Value:</th>
     <td style="white-space: nowrap">
       <div>
-        [ none | <a>&lt;funciri&gt;</a> ]{1,4}
+        [ none | <a>&lt;marker-ref&gt;</a> ]{1,4}
         [ / <a class="property" href="#MarkerPatternProperty">&lt;‘marker-pattern’&gt;</a> ]?
       </div>
       <div style="margin-left: 2em">
-        | <a>&lt;funciri&gt;</a>{0,4} [ <a>&lt;length&gt;</a> | <a>&lt;percentage&gt;</a> ] [ <a>&lt;length&gt;</a> | <a>&lt;percentage&gt;</a> | <a>&lt;funciri&gt;</a> ]*
+        | <a>&lt;marker-ref&gt;</a>{0,4} [ <a>&lt;length&gt;</a> | <a>&lt;percentage&gt;</a> ] [ <a>&lt;length&gt;</a> | <a>&lt;percentage&gt;</a> | <a>&lt;marker-ref&gt;</a> ]*
       </div>
     </td>
   </tr>
@@ -2612,30 +2648,30 @@
 Values for have the following meanings:</p>
 
 <dl>
-  <dt><span class="prop-value">none | <a>&lt;funciri&gt;</a></span></dt>
+  <dt><span class="prop-value">none | <a>&lt;marker-ref&gt;</a></span></dt>
   <dd>Sets <a>'marker-start'</a>, <a>'marker-mid'</a> and <a>'marker-end'</a>
   to the specified value, and sets <a>'marker-segment'</a> and
   <a>'marker-pattern'</a> to <span class="prop-value">none</span>.</dd>
 
-  <dt><span class="prop-value">[ none | <a>&lt;funciri&gt;</a> ]{2}</span></dt>
+  <dt><span class="prop-value">[ none | <a>&lt;marker-ref&gt;</a> ]{2}</span></dt>
   <dd>Sets <a>'marker-start'</a> and <a>'marker-end'</a> to the two
   values specified, and sets <a>'marker-mid'</a>, <a>'marker-segment'</a> and
   <a>'marker-pattern'</a> to <span class="prop-value">none</span>.</dd>
 
-  <dt><span class="prop-value">[ none | <a>&lt;funciri&gt;</a> ]{3}</span></dt>
+  <dt><span class="prop-value">[ none | <a>&lt;marker-ref&gt;</a> ]{3}</span></dt>
   <dd>Sets <a>'marker-start'</a>, <a>'marker-mid'</a> and <a>'marker-end'</a> to
   the three values specified, and sets <a>'marker-segment'</a> and
   <a>'marker-pattern'</a> to <span class="prop-value">none</span>.</dd>
     
-  <dt><span class="prop-value">[ none | <a>&lt;funciri&gt;</a> ]{4}</span></dt>
+  <dt><span class="prop-value">[ none | <a>&lt;marker-ref&gt;</a> ]{4}</span></dt>
   <dd>Sets <a>'marker-start'</a>, <a>'marker-segment'</a>, <a>'marker-mid'</a>
-  and <a>'marker-end'</a> to the four <a>&lt;funciri&gt;</a> values
+  and <a>'marker-end'</a> to the four <a>&lt;marker-ref&gt;</a> values
   specified, and sets <a>'marker-pattern'</a> to
   <span class="prop-value">none</span>.</dd>
 
-  <dt><span class="prop-value">[ none | <a>&lt;funciri&gt;</a> ]{1,4} / <a class="property" href="#MarkerPatternProperty">&lt;‘marker-pattern’&gt;</a></span></dt>
+  <dt><span class="prop-value">[ none | <a>&lt;marker-ref&gt;</a> ]{1,4} / <a class="property" href="#MarkerPatternProperty">&lt;‘marker-pattern’&gt;</a></span></dt>
   <dd>Sets <a>'marker-start'</a>, <a>'marker-segment'</a>, <a>'marker-mid'</a>
-  and <a>'marker-end'</a> to the four <a>&lt;funciri&gt;</a> values
+  and <a>'marker-end'</a> to the four <a>&lt;marker-ref&gt;</a> values
   specified before the slash, and sets <a>'marker-pattern'</a> to
   the value after the slash.</dd>