W3C home > Mailing lists > Public > www-svg@w3.org > February 2006

RE: Error processing

From: Jon Ferraiolo <jonf@adobe.com>
Date: Wed, 1 Feb 2006 09:31:56 -0800
Message-ID: <6ECA24BE410D994496A2AE995367C5C8643ACF@namail3.corp.adobe.com>
To: "Cameron McCormack" <cam-www-svg@aka.mcc.id.au>, <www-svg@w3.org>

Cameron,
My understanding is that the SVG WG has concluded that it is too much to
require that conformant UAs need to render up to the first error in the
document. In other words, stopping rendering at the first element which
has an error is extra credit, but it is OK to simply provide a highly
visible indication of error.

Another related change is that with SVG 1.2 (certainly for Tiny,
probably for Full, also) there are fewer things which are considered "in
error". Some of the bad values such as "-1" for a radius which
previously were defined as errors are now becoming unsupported values,
which the UA must process as if the value had not been specified. The
'r' attribute for circle is a case in point:

http://www.w3.org/TR/SVG11/shapes.html#CircleElement
http://www.w3.org/TR/SVGMobile12/shapes.html#CircleElement
http://www.w3.org/TR/SVGMobile12/implnote.html#UnsupportedProps

A major contributor to this change was the realization that there was
poor interoperability for SVG 1.1's rules around bad values and too
great of an implementation burden on mobile device implementers, and
there was hope that there would be better interoperability with the
revised rules.

Jon

-----Original Message-----
From: www-svg-request@w3.org [mailto:www-svg-request@w3.org] On Behalf
Of Cameron McCormack
Sent: Tuesday, January 31, 2006 9:28 PM
To: www-svg@w3.org
Subject: Error processing


Hi.

In SVG 1.1 section F.2 Error Processing it states:

  The following error processing shall occur when a document is in
  error:

    * The document shall be rendered up to, but not including, the first
      element which has an error.

Let's say I have this document:

  <svg ...>
    <rect width="100" height="100" onclick="evt.target.width.baseVal =
-1"/>
    <circle cx="100" cy="100" r="50"/>
  </svg>

If I click on the rect should the circle disappear?

How about this one:

  <svg ...>
    <circle cx="100" cy="100" r="50" fill="url(#a)"/>
    <circle cx="200" cy="200" r="50" fill="url(#b)"
            onclick="document.getElementById('b')
                             .setAttributeNS(null, 'r', '-1')"/>
    <defs>
      <radialGradient id="b">
        <stop offset="0" stop-color="yellow"/>
        <stop offset="100%" stop-color="red"/>
      </radialGradient>
      <radialGradient id="a">
        <stop offset="0" stop-color="white"/>
        <stop offset="100%" stop-color="black"/>
      </radialGradient>
    </defs>
  </svg>

After clicking on the second circle, the 'b' radialGradient element is
in error.  The text says the document "shall be rendered up to" just
before the element in error.  Does processing of the 'a' radialGradient
count as being "rendered" and thus the first circle is in error, since
it references 'a'?

Thanks,

Cameron

-- 
 Cameron McCormack			ICQ: 26955922
 cam (at) mcc.id.au			MSN: cam (at) mcc.id.au
 http://mcc.id.au/			JBR: heycam (at) jabber.org
Received on Wednesday, 1 February 2006 17:32:14 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:53 UTC