Re: High-Quality Dynamic SVG Viewer

On Monday, January 20, 2003, 12:09:00 PM, Jim wrote:

JL> www-qa removed.
JL> "Tobias Reif" <>
>> Jim Ley wrote:
>> >>- [...] The answer is to create a temporary well-formed
>> >>  version of the partial download (close all open tags, etc) and
>> >>  then render. [...]
>> > This is a sensible approach, and I fully support it.
>> How should the app do "close all open tags, etc" for the following?
>> (Real question :)

JL> I think, thinking in the XML space obscures the issue, we're rendering SVG
JL> elements, as soon as we have enough information on something to render, we
JL> can do that, since we alway layer content on top, consider:

JL> <svg>
JL>  <g>
JL>   <g>
JL>    <g>
JL>    <rect x="10" y="10" width="10" height="10"/>

JL> Without the closing tags of the svg, or g, we have enough information to
JL> draw the rectangle, however because we don't know at this stage if the
JL> document is well-formed,

well, the evidence at that point is that it is well formed.
Anglo-saxon law, innocent until proven guilty. As soon as you get a
</svg> or a </rect> or or the pipe closes or something else that
indicates its not well formed, then its not well formed.

JL> we cannot render anything according to the current
JL> spec.  (this wouldn't be a problem of course if we built on SGML, rather
JL> than XML, then we could've had closing tags as optional...)

You seem to be mixing up the static and dynamic views of the document.
SGML speaks of the static view - you get the whole document and look
at it, and in SGML you can say the closing tags are optional.

That is not the intent here. Its more to allow rendering of partially
downloaded documents - documents that we know are incomplete because
they are still loading.

JL> How I take Dean's suggestion (which isn't in spec speak yet) is that the
JL> parser is allowed to work on the assumption that every open element is
JL> actually closed some time later in the stream,


JL> this will allow it to render
JL> the rectangle in the above example - note the rectangle is well formed, so
JL> it's not rendering anything that isn't well-formed because of this
JL> assumption, it's simply allowing it to render elements which are parts of
JL> fragments.  I don't think what I agreed it to is any different to your
JL> DocumentFragment wording.

I agree.


Received on Tuesday, 21 January 2003 12:07:11 UTC