At 22:45 29/4/97 -0700, Tim Bray wrote:
>Neither <foo bar=baz> or <a><b></a> are XML; XML is simple enough that
>there is a good probability that these, rather than author error, are the
>result of a broken communication link or output filter. The proper
>response to such breakage is prompt termination without extreme prejudice
>but with a clear error signal.
No - the proper response can often be to display what you have received,
warts and all. Display it with all the tags in, as if it were a View Source
window. The presence of the tags should immediately tell the user that this
is an invalid XML file that cannot be formatted according to the associated
style sheet. If the browser highlights the tag that gave the first error in
bold, and follows this with an explanatory message indicating what type of
error so much the better. Ideally the incorrect part of the file will be in
the displayed area of the screen, rather than just displaying the start of
the file.
I for one don't want to wait until a correct file can be accurately
transmitted over an overloaded network every time I ask for a bit of XML
data that fails to transmit properly. If I can find what I was looking for
in the warts and all version this may stop me needing to overload the
network even further.
Incidentally, remember that the error messages will be user-specific - they
will need to be in the language of the system user rather than the parser
writer. We therefore need a way of switching message sets within each
browser on a language basis.
----
Martin Bryan, The SGML Centre, Churchdown, Glos. GL3 2PU, UK
Phone/Fax: +44 1452 714029 WWW home page: http://www.sgml.u-net.com/