Re: is this switch valid?

"~:'' ありがとうございました。" wrote:

> the validator is barphing* on the attached SVG sample**.
> some code has been removed to help identify the issue

As usual in validation issues, the URL of the problem document should 
have been included.

> * Line 26, Column 3: end tag for "switch" omitted, but OMITTAG NO was
> specified.

That's not the _first_ error message you get, is it? When I test your 
fragment (using the W3C validator's nice feature of specifying DOCTYPE 
interactively, and adding <svg> tags), I first get

document type does not allow element "foreignObject" here; assuming 
missing "switch" start-tag.

After this, it's no big surprise to get a message about missing end tag 
as well.

I don't really know SVG, but neither need I know it to see that the 
markup

<g  requiredExtensions="http://example.com/SVGExtensions/EmbeddedXHTML">
     <foreignObject width="100" height="50">
     </foreignObject>
</g>

is indeed invalid, since by the DTD, a <g> element may not have a 
<foreignObject> as its subelement ("child") - unless you're using DTD 
extensions. The <foreignObject> element is allowed as a subelement of a 
<switch> element only.

Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/ 

Received on Sunday, 9 December 2007 09:41:32 UTC