W3C home > Mailing lists > Public > www-svg@w3.org > December 2007

Re: is this switch valid?

From: ~:'' ありがとうございました。 <j.chetwynd@btinternet.com>
Date: Mon, 10 Dec 2007 17:34:48 +0000
Message-Id: <1C5EAD6F-6272-4108-B8C2-82C6952B1F4A@btinternet.com>
Cc: "www-svg List" <www-svg@w3.org>
To: Erik Dahlström <ed@opera.com>


I had originally used:
   <foreignObject class="audio" xlink:href="sound/en/read.mp3">
which indeed worked for a while in Opera.
However this doesn't validate, and as it stopped working recently in  
the nightlies.

Please can you confirm whether in your opinions this is valid SVG 1.1  
and whether Opera will support.
it's vital that a single code sample works across UAs


Jonathan Chetwynd
Accessibility Consultant on Media Literacy and the Internet

On 10 Dec 2007, at 12:24, Erik Dahlström wrote:

On Mon, 10 Dec 2007 11:53:14 +0100, ~:'' ありがとうございま 
した。 <j.chetwynd@btinternet.com> wrote:

> Erik,
> but can you advise me whether or when Opera will support the audio  
> with CSS as used in http://www.peepo.co.uk

I think what you might be experiencing here is some difference in how  
foreignObject is supported in browsers.
In SVGT12 there is an xlink:href attribute on the foreignObject  
element, in SVG 1.1 it lacks this.

If you have an xlink:href attribute that will always be used instead  
of the child elements, according to SVGT12.

 From looking at the source of your site I see you make some  
assumptions that audio can be handled in foreignObject by passing it  
an xlink:href to some audio file. That's not supported in Opera 9.x,  
but you could use the audio element in SVGT12 if you use the special  
video builds of Opera[1].

Here are some suggestions:
- if you want it to work in Opera 9.2 and up: make a small html file  
with an object element linking to your audio file. Then reference  
this in foreignObject, like this <foreignObject  

- if you want it to work in Opera 9.5 and up: use the audio element  
(switch on requiredFeature="http://www.w3.org/Graphics/SVG/feature/ 
1.2/#Audio") or remove the xlink:href on the foreignObject so that  
the child elements are processed (I think this is what Firefox does,  
since I can't get any xlink:href content to show up there)

Your best bet for compatibility with current browsers is the first  
option I think, and you should make sure the child elements of the  
foreignObjects and the files you reference are the same.


[1] http://dev.opera.com/articles/view/a-call-for-video-on-the-web- 

Erik Dahlstrom, Core Technology Developer, Opera Software
Received on Monday, 10 December 2007 17:35:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:17 UTC