RE: Error handling rules?

Thanks for the comments.  Response below:

> -----Original Message-----
> From: Ian Hickson [mailto:ian@hixie.ch] 
> Sent: Tuesday, May 22, 2001 2:31 PM
> To: www-xml-xinclude-comments@w3.org
> Subject: Error handling rules?
> 
> 
> 
> http://www.w3.org/TR/2001/WD-xinclude-20010516/
> 
> I was very impressed overall by this spec. The only thing that I
> consider is missing from the specification is a normative section
> explaining how errors should be handled.
> 
> If an XInclude-conforming UA attempts to use the following ill-formed
> XML document:
> 
>    <foo></bar>
> 
> ...then it should (per XML) refuse to process the document further.
> 
> What should happen if an XInclude-conforming UA attempts to use the
> following well-formed but non-XInclude-conforming document?
> 
>    <include xmlns="http://www.w3.org/1999/XML/xinclude"
>       parse="html" href="hello.html"/>
> 
> Should it refuse to handle the document at all? Should it silently
> ignore it? Should it embed a predefined infoset containing an error
> message? For interoperability I highly recommend defining standard
> error handling behaviour (as XML and CSS do, for example).

Accepted.  We will more clearly follow XML by defining two error
classes, "fatal errors" for syntax errors, and "errors" for other errors
such as resource errors.  We don't plan to allow applications to recover
from fatal errors.  The handling of errors other than fatal errors will
be left up to the application.  We're currently considering a request
from the HTML WG to allow recovery from non-fatal errors.  Please check
the response to the HTML comments in a week or two for more details.

> (Also, if the root of an XML document is an xi:include element with
> parse="text", is that an error? The only case the spec currently
> mentions is that of replacing a root element with two or more
> elements, there is no mention of replacing the root element with
> anything else that would make the document ill-formed.)

Accepted.  We will clarify that top-level inclusions must result in a
list of included items that contains zero or more comments, zero or more
processing instructions, and one element.

> Cheers,
> -- 
> Ian Hickson                                            )\     
> _. - ._.)   fL
> Invited Expert, CSS Working Group                     /. `- '  (  `--'
> The views expressed in this message are strictly      `- , ) -  > ) \
> personal and not those of Netscape or Mozilla. ________ (.' 
> \) (.' -' ______
> 
> 

Received on Thursday, 28 June 2001 10:13:35 UTC