- From: Erik Dahlstrom <ed@opera.com>
- Date: Thu, 23 Jun 2011 14:01:05 +0200
- To: "www-svg@w3.org" <www-svg@w3.org>
Hello,
I'm wondering what good is the <switch> element if it doesn't seem to read
the requiredFeatures attribute from unknown elements.
Additionally it doesn't fully disable processing of the non-chosen
subtrees, as illustrated by the audio/video example below.
Questions:
* What should happen in the switch below?
* Should the audio from the video be heard?
* Should the requiredFeatures attributes be used by the switch even though
these elements
are unknown? Or is requiredFeatures only possible on svg elements that
the UA knows about?
* Given the current state of implementations <switch> is very close to
useless, how do we want to proceed wrt this for SVG2?
Example:
<svg xmlns='http://www.w3.org/2000/svg'
xmlns:xlink='http://www.w3.org/1999/xlink' viewBox="0 0 400 400"
id="svgroot">
<text x="200" y="40" text-anchor="middle" font-size="9">You should see a
video in the rectangle below if your browser supports
<tspan x="200" dy="1.5em">foreignObject, HTML5 video and Ogg Theora
(maybe).</tspan></text>
<rect x="100" y="100" width="200" height="200" stroke-width="4"
stroke="black" fill="none"/>
<switch>
<myCustomFooElement xmlns="http://example.com/foobarML" width="400"
height="400" fill="red" requiredFeatures="bar"/>
<aNewSvg5Element width="400" height="400" fill="red"
requiredFeatures="SVG5featurestring"/>
<foreignObject id="fo" x="100" y="100" width="200" height="200">
<div xmlns="http://www.w3.org/1999/xhtml">
<video width="200" height="200" autoplay="autoplay"
controls="controls">
<source src="example.ogv" type='video/ogg; codecs="theora, vorbis"'/>
</video>
</div>
</foreignObject>
</switch>
</svg>
--
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Thursday, 23 June 2011 12:01:36 UTC