Re: More on SVG within HTML pages

Lachlan Hunt wrote:
> 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.
> 
> According to the SVG spec, yes, any namespaced attributes or elements 
> can be used anywhere.
> 
> http://www.w3.org/TR/SVG/extend.html
> 
>> "Attribute "sodipodi:version" is not a valid attribute"
>>
>> Why?  The sodipodi namespace and prefix have been declared on the root 
>> element?
>>
>> Is this just a bug in the valdiator?
> 
> I suspect the reason for the discrepency is because the W3C validator 
> uses DTD based validation, which has inherent limitations in it's 
> ability to express conformance requirements when namespaces and prefixes 
> are involved.  i.e. There's no way to express in a DTD that any element 
> or attribute with any unknown prefix in any namespace is allowed.

+1

I'll also note that the W3C validator contributes to this by inserting 
the SVG 1.1 DOCTYPE, and even states as much, before it lists the 
discrepancy it finds between the document and the DOCTYPE it inserted.

Validator.nu is not limited by the ability of DTDs, and should follow 
the guidance of section 23.1.  And, in fact does:

http://validator.nu/?doc=http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fb%2Fb7%2FWikipedia-logo.svg

Furthermore Shelley's original example was embedded in a HTML5 document, 
and should in no way be limited by the SVG 1.1 DOCTYPE.

- Sam Ruby

Received on Monday, 7 September 2009 21:41:44 UTC