W3C home > Mailing lists > Public > public-html@w3.org > September 2009

Re: More on SVG within HTML pages

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 07 Sep 2009 17:22:30 -0400
Message-ID: <4AA57996.8030102@mit.edu>
To: Jeff Schiller <codedread@gmail.com>
CC: HTML WG <public-html@w3.org>
Jeff Schiller wrote:
> Maciej wrote:
>> (46 errors, specifically about the use of attributes from foreign
>> namespaces in a way that is not allowed by SVG 1.1 itself.)
> 
> Am I misunderstanding something?  Actually that use of namespaced
> attributes and elements is perfectly valid from what I can see.
> 
> "Attribute "sodipodi:version" is not a valid attribute"
> 
> Why?  The sodipodi namespace and prefix have been declared on the root element?

The document in question uses a DTD, and does not validate against that 
DTD.  Being declared makes it well-formed XML complying with the 
Namespaces in XML specification.  DTD validity is an additional 
constraint on top of that.

Put another way, this is a namespace-well-formed SVG document:

   <svg xmlns="http://www.w3.org/2000/svg"
        my-random-attribute="I made this up"/>

It is not, however, valid SVG 1.1, if by "valid SVG 1.1" we mean 
"conforms to the SVG 1.1 DTD".

Of course SVG 1.1 section 23.1 basically says that SVG allows this sort 
of markup.  I can't tell you whether that means the SVG 1.1 DTD is buggy 
or whether section 23.1 is in error or whether something else bizarre is 
going on.  But if you feed an SVG document that contains attributes not 
declared in the SVG DTD through a DTD-based validator (like the W3C 
one), then it'll come up as invalid.  That's just the nature of the beast.

-Boris
Received on Monday, 7 September 2009 21:23:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:48 GMT