W3C home > Mailing lists > Public > public-svg-wg@w3.org > January to March 2009

Re: Some notes on SVG parsing in HTML 5

From: Cameron McCormack <cam@mcc.id.au>
Date: Thu, 26 Feb 2009 10:10:09 +1100
To: public-svg-wg@w3.org
Message-ID: <20090225231009.GD22306@arc.mcc.id.au>
Hello WG.

Andi Sidwell pointed out to me off list that one of the summarised
points I made about the commented-out proposal in HTML 5 is incorrect.
(I misread the spec, it seems.)

Cameron McCormack:
> Parsing this document:
> 
>   <!DOCTYPE html>
>   <html>
>     <head>
>       <title></title>
>     </head>
>     <body>
>       <svg>
>         <circle r='100'/>
>       </svg>
>     </body>
>   </html>
> 
> would be non-conforming, since the <svg> tag is missing an
> xmlns='http://www.w3.org/2000/svg' attribute.  That element would,
> however, be an {http://www.w3.org/2000/svg}svg element.

In fact, the above would conforming.  The requirement is that if an
xmlns attribute is present, then it must hold the correct namespace URI
for the element (i.e., "http://www.w3.org/2000/svg" for <svg>).
Omitting the xmlns="" attribute is conforming, and still results in the
element being placed in the SVG namespace.

This behaviour then is consistent with how xmlns:xlink="" is handled.

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Wednesday, 25 February 2009 23:10:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 February 2009 23:10:58 GMT