Re: Does SVG 1.0 define this? (non-<svg> root element)

"Ian Hickson" <ian@hixie.ch> wrote in message
news:Pine.LNX.4.58.0406122122010.3032@dhalsim.dreamhost.com...
>
> On Sat, 12 Jun 2004, Jim Ley wrote:
> >>
> >> I couldn't find anything in the spec that defined how an XML file whose
> >> root element is in the SVG namespace but isn't the <svg> element should
be
> >> handled. Am I missing something?
> >
> > I don't see how this could be valid SVG to any of the SVG dtd's, do you
have
> > an example?
>
> I'm not sure how DTDs are relevant here, since SVG 1.0 does not require
> that an implementation check for validity against a DTD.

The conformance requirements are clear about what conformant documents and
viewers are, as you agree later in your post, the fact it's non-conformant
is highly relevant - I was just confused by your original question which
didn't seem to acknowledge that the document wasn't an SVG one (it just
contained elements from the SVG namespace).

>    <rect x="0" y="0" width="200" height="100" fill="blue"
>          xmlns="http://www.w3.org/2000/svg"/>

This is not a valid SVG document fragment, do the process described in G.2,
and you'll see.  The spec makes no statements on what happens with such
non-conformant documents.  I'd encourage user agent authors to make a best
effort at error correcting it into something it can render (ie something
that is conformant), but I'm probably rare in that.

Jim.

Received on Saturday, 12 June 2004 17:40:36 UTC