W3C home > Mailing lists > Public > public-svg-wg@w3.org > October to December 2010

Re: Bug in struct-use-04-b.svg and it's friends?

From: Erik Dahlstrom <ed@opera.com>
Date: Wed, 13 Oct 2010 19:44:59 +0200
To: "Alex Danilo" <alex@abbra.com>, "public-svg-wg@w3.org" <public-svg-wg@w3.org>
Message-ID: <op.vkizk92fgeuyw5@mbp.local>
On Wed, 13 Oct 2010 02:37:57 +0200, Alex Danilo <alex@abbra.com> wrote:

> Hi All,
>
> 	Investigating some of our failures and looking at the cause,
> it looks to me like 'struct-use-04-b.svg' is in error. Unless I've
> missed something weird, I think it's wrong.

Yeah, I think it's probably not a bad idea to add explicit namespace  
declarations on the root element there.

> 	The test is checking external <use> and references a rect,
> circle, polygon and ellipse in an external file.
>
> 	The external file is '../images/svgRef4.svg' which has
> as its root element:
>
> <svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" >
>
> i.e. no namespace declaration.

There is an SVG doctype though, which is what Opera looks at in this case.

 From the XML spec[1] it follows that #FIXED attributes should be qualified  
with the given default value, which in the SVG DTD declares the svg and  
the xlink namespaces on the svg element.

> If 'svgRef4.svg' is parsed with an
> XML parser, the elements with id of 'alpha', 'beta', etc. are in
> the null namespace, not in the SVG namespace.

Right, unless the UA either loads the external DTD and applies it  
(optional), or knows what it is and applies it (you might argue that it's  
still optional of course).

Cheers
/Erik

[1] http://www.w3.org/TR/REC-xml/#sec-attr-defaults

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Wednesday, 13 October 2010 17:45:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 13 October 2010 17:45:39 GMT