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

Re: 'foreignObject' can be a child of any container element, but must be a descendent of a switch?

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Mon, 10 Dec 2007 14:08:08 +0100
To: www-svg@w3.org
Message-Id: <200712101408.08570.Dr.O.Hoffmann@gmx.de>

> 'foreignObject' can be a child of any container element, but must be
> a descendent of a switch?
>
> I don't know the SVG1.2 DTD, but would this express your suggestion?
>
> seems sensible to me for SVG1.1
>
> regards
>
> Jonathan Chetwynd
> Accessibility Consultant on Media Literacy and the Internet
>
>
>

1.2 has no DTD, it uses another scheme.
Apart from possibly not discovered errors you can find
possible children for any element in the informative (!)
appendix K of the SVGT1.2 CR
http://www.w3.org/TR/SVGMobile12/elementTable.html
(If you are not motivated to learn RelaxNG right now ;o)

There are some improvements for example related to
the usage of switch in 1.2, not available in 1.1 and 
some maybe even more useful attributes for conditional
processing, for example requiredFormats - in your case
usable directly to test, whether MP3 is supported or not.
Such improvements are not usable in 1.1 documents,
checked successfully in the validator.

And again just a guess - when 1.1 was written, there was
maybe no support at all for foreignObject, therefore it was
even more important to force the usage of switch.

1.2 moves the responsibility more to the author to do 
something useful and does not force anymore to switch.
This is a minor, but in your case currently important change
from 1.1 to 1.2. In 1.2 there is already an audio and video
element anyway, to provide specific timed elements for
your purpose, without using foreignObject and XHTML at
all. But obviously you cannot expect, that older viewers
like the adobe plugin or Opera 8 will care about new 1.2
elements. Or that current Geckos are able to care about
timed elements at all in a useful way (this is related to
their gap in SMIL animation using the same timing approach).
Received on Monday, 10 December 2007 13:12:20 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:38 GMT