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

Re: is this switch valid?

From: Chris Lilley <chris@w3.org>
Date: Tue, 11 Dec 2007 21:04:43 +0100
Message-ID: <1965267730.20071211210443@w3.org>
To: www-svg@w3.org
Cc: j.chetwynd@btinternet.com

Hello Jonathan,

The SVG WG just discussed your email:

The example you gave is valid to the SVG Tiny 1.2 relaxNG schema but is not valid to the SVG 1.1 (Tiny, Basic or Full) DTD.

We wanted to express that foreignObject should only be a child of a switch, to ensure there was fallback. DTDs are not very flexible and 'allowed as child of a g as long as the g is a child of a switch' isn't something that DTDs can say.

The content that you have is entirely reasonable and will work in 1.2; for 1.1, remove the 'g' element surrounding foregnObject and put the test attribute directly on foreignObject. (yes, that means you can't have a foreignObject 'plus some other stuff' as one branch of the switch, which is probably why you would want a g in the first place.

Also, the error message you report implies a non well formed sample; perhaps the example in your email is not exactly what you sent to the validator?

Hope that answers your question.

 Chris Lilley                    mailto:chris@w3.org
 Interaction Domain Leader
 Co-Chair, W3C SVG Working Group
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG
Received on Tuesday, 11 December 2007 20:04:51 UTC

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