W3C home > Mailing lists > Public > www-svg@w3.org > January 2003

Re: High-Quality Dynamic SVG Viewer

From: Chris Lilley <chris@w3.org>
Date: Tue, 21 Jan 2003 18:07:01 +0100
Message-ID: <138103094093.20030121180701@w3.org>
To: www-svg@w3.org, "Jim Ley" <jim@jibbering.com>
CC: "Tobias Reif" <tobiasreif@pinkjuice.com>

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


JL> www-qa removed.
JL> "Tobias Reif" <tobiasreif@pinkjuice.com>
>> 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,

yes

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.




-- 
 Chris                            mailto:chris@w3.org
Received on Tuesday, 21 January 2003 12:07:11 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:24 GMT