Re: externalResourcesRequired and SVGLoad

It has been brought to my attention that my original email (included 
below for reference) did not very clearly state any sort of question. 
So here goes attempt number two:

Summary:
The SVG1.1 specs seem to be internally inconsistent, in one place 
saying that SVGLoad (on any element) will wait for 
externalResourcesRequired="true" elements to have loaded their content, 
and in another location implying that only the document's SVGLoad event 
will wait for such. I propose a change in wording.

Details:
Discussing the SVGLoad event:
"The event is triggered at the point at which the user agent has fully 
parsed the element __and its descendants__ and is ready to act 
appropriately upon that element, such as being ready to render the 
element to the target device. Referenced external resources that are 
required must be loaded, parsed and ready to render before the event is 
triggered. Optional external resources are not required to be ready for 
the event to be triggered." [1]

Discussing the externalResourcesRequired property set to 'true':
"Indicates that resources external to the current document are 
required. If an external resource is not available, progressive 
rendering is suspended, the __document's__ SVGLoad event is not fired 
and the animation timeline does not begin until that resource and all 
other required resources become available, have been parsed and are 
ready to be rendered."

Note how the latter implies that only the SVGDocument's SVGLoad event 
is affected by setting externalResourcesRequired="true" on any child 
element.

I'm not a wordsmith, but perhaps something like the following would be 
more appropriate:

"Indicates that resources external to the current document are 
required. Progressive rendering for the element is suspended, the 
element's SVGLoad event (and any SVGLoad events of the element's 
ancestors) is not fired, and the animation timeline does not begin 
until that resource and all other required resources become available, 
have been parsed and are ready to be rendered."

(I also chose to remove the words "If an external resource is not 
available" because the intent is already taken care of by the phrase 
'until that resource [...] become available', and it also implies to me 
a condition where the resource is _never_ available, not just 
not-quite-ready-yet.)

[1] http://www.w3.org/TR/SVG11/interact.html#LoadEvent
[2] http://www.w3.org/TR/SVG11/struct.html#ExternalResourcesRequired


Original Email:
On Tuesday, October 21, 2003, at 01:52  PM, Gavin Kistner wrote:
> In discussing the externalResourcesRequired attribute/property, the 
> SVG1.1 specs say:
>
> "true -- Indicates that resources external to the current document are 
> required. If an external resource is not available, progressive 
> rendering is suspended, the **document's** SVGLoad event is not fired 
> and the animation timeline does not begin until that resource and all 
> other required resources become available, have been parsed and are 
> ready to be rendered." [1]
>
> (The asterisk emphasis is, of course, mine.)
>
> I submit that the intent of an SVGLoad event is violated if this does 
> not apply to each SVGLoad event in the chain on up, including the 
> element with this attribute.
>
> For example, for the code:
>
> <use
>     xlink:href="nodes.svg#router"
>     externalResourcesRequired="true"
>     onload="loaded()"
>     />
>
> I expect that function not to fire until after the 'nodes.svg#router' 
> code has been loaded from the url and rendered. This is how it works 
> for HTML (the onload event for an image doesn't fire until the image 
> has been loaded) and IMO is the only reasonable interpretation of an 
> onload event combined with external loading of data.
>
>
> [1] http://www.w3.org/TR/SVG11/struct.html#ExternalResourcesRequired
--
Gavin Kistner @ Refinery, Inc.
gavin@refinery.com
work: +1.303.444.1777
cell: +1.303.641.1521

Received on Thursday, 23 October 2003 11:27:46 UTC