W3C home > Mailing lists > Public > www-tag@w3.org > December 2008

Re: Comments on HTML WG face to face meetings in France Oct 08

From: Julian Reschke <julian.reschke@gmx.de>
Date: Sat, 06 Dec 2008 11:29:22 +0100
Message-ID: <493A5402.8020605@gmx.de>
To: Ian Hickson <ian@hixie.ch>
CC: "Henry S. Thompson" <ht@inf.ed.ac.uk>, noah_mendelsohn@us.ibm.com, public-html <public-html@w3.org>, www-tag@w3.org

Ian Hickson wrote:
> ...
> Incidentally, do you know if the current specs define how a user agent is 
> to handle the following bytes if they are received by the client _before_ 
> the client knows if there are any more bytes?
>    <?xml-stylesheet href="data:text/css,*{font-weight:bold}"?>
>    <root>text <outer>outer <inner>inner</outer>

I assume the stylesheet PI is irrelevant here...

It seems you're asking whether it's legal for a recipient to start 
rendering before the full content has been received (which of course is 
something users want).

As far as I can tell, there's no reason not to do that; but if the XML 
content turns out to be non-wellformed (let's please ignore "invalid" in 
this context), the UA should notify the user that the message was 
broken, for instance by the famous "yellow screen of death".

As a matter of fact, this (progressively rendering and fail late when 
required) is what IE6 has been doing for eons when displaying generic 
XML (not XHTML) with an XSLT PI.

> I haven't been able to find where the XML spec defines how to process such 
> a document -- it's not strictly an "XML document" since it isn't 
> well-formed, but it might become well-formed if the next few bytes are 
> "</root>", or it might become definitely not well-formed if, say, there 
> are no more bytes. Surely the processing of the earlier part of the 
> document doesn't change based on later parts of the document. Indeed in 
> many applications, it couldn't change.

Of course it could. In the worst case an application can always collect 
the whole data and wait for the end of the document before doing 
something with the data.

And yes, there are case where this *is* desirable for robustness, and 
thus it would be bad if the XML spec mandated something different.

 > ...

BR, Julian
Received on Saturday, 6 December 2008 10:33:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:56:25 UTC