W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > April 1997

Re: Error handling in XML

From: Satwinder Mangat <SMANGAT@novell.com>
Date: Mon, 21 Apr 1997 09:27:26 -0600
Message-Id: <s35b331c.007@novell.com>
To: w3c-sgml-wg@w3.org

 > I suggest that we add language to section 5, "conformance", which says:
> 
>  "An XML processor which encounters a violation of the constraints
>   of well-formedness must not thereafter pass any information about
>   text or markup to the application.  It must pass to the application
>   a notification of the first such violation encountered.  It MAY
>   thereafter, at user option, pass to the application information
>   about well-formedness violations encountered after the first."
> 
> [or in English: you gotta tell the app about the first syntax botch you hit;
>  you're allowed to send the app more error messages, but you're not allowed
>  to send anything but error messages after you've detected an error]

I disagree that XML processor stops passing any text information about text or markup
to the application after first violation.  There may be lot of applications that may require
data after that.

The solution can be that after the first violation is encountered, notify application and then
DON'T send any data until the </endtag> of the <tag> in which violation occured.  Start
sending the data again after </endtag>

For example:

<startdocument>
        [ 1. some other correct tags / informations ]

      <starterrortag>
            [2. >>> violation occured in this tag.]
      </enderrortag>

       [ 3. some more information ]
 
</enddocument>

1 and 3 information is sent but information 2 is sent only if required by the application.
(by default the information 2 can be skipped.)

-----------------------------------------------------------------------------
Satwinder Singh Mangat
Novell Inc.
Received on Monday, 21 April 1997 11:28:03 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 10:04:25 EDT