Re: Betting our lives on error handling

In message <libSDtMail.9705091838.12321.altheim@mehitabel> altheim writes:
[...]
> 
> I'm now going to ask some rhetorical questions that I hope indicate that
> the whole issue of application error handling is beyond the scope of a
> syntax specification for a markup meta-language.

I think these Q's highlight the need for the draft to specify more clearly
the role of a processor and of an application and what may or may not pass
between them.  If, as HenryT has suggested, syntax and action should be 
separated, this may belong in such a separate, but essential, part of the 
draft.

> 
> The whole issue of good DTD design in XML brings up two classes of errors
> related to XML documents with DTDs. What happens when:
> 
>   Q1. the error occurs ten lines into the DTD, but the instance is WF?
>    
>   Q2. the error occurs in the document instance, after the DTD 
>       has passed muster?
> 
> which brings up another question:      
> 
>   Q3. if the answer is to treat the instance in Q1 as WF, how does the
>       processor communicate to the application the necessary information
>       to ignore the DTD and only display the instance? Or do we shove the
>       DTD in the user's face too? Note that absent the DTD, we probably

I have a complementary concern - what components of the input to the parser
(== processor) must/may/mustnot, etc. be passed to the application.  
At present Lark does not pass any DOCTYPE info to the application (though
it *is* possible to extract the DOCTYPE string itself.  It simply passes
the root element and its children.  PIs and syntax errors can be extracted
if required.  NXP passes the ESIS stream, and it is possible (I think) to
extract the DOCTYPE information.  Here are some things that must be defined
before Murray can ask his questions:

boolean hasDOCTYPEInfo();
boolean validationAttempted();
boolean isValidDocument();
boolean isWellFormed();
String getDoctype();

and I would wish many more.
  
>       can't apply the style sheet, at least reliably. Raw text of DTD
>       in user's face. Sour looks. Or they don't get the DTD, if the
>       application (minus the XML processor) can differentiate the two.
>       My impression of an XML application is that it isn't doing any
>       parsing itself, so it isn't going to know where the DTD ends and
>       the instance begins.

This is my interpretation, though I would assume it would be passed:
	- a grove
	- OR:
		- the parsed document (ESIS equivalent) and
		- the DOCTYPE if present in the document
		- OPTIONALLY the DTD info
> 
[...]
> 
> As I said, I'm not asking for answers, only posing questions the answer to
> which I think are better left out of a syntax specification. If we begin
> to define behaviors for these types of errors, where do we stop? 

Whether or not behaviours are defined, I think it's important to define
the types of error and the components that may or may not be passed to the
application.

	P.

-- 
Peter Murray-Rust, domestic net connection
Virtual School of Molecular Sciences
http://www.vsms.nottingham.ac.uk/

Received on Saturday, 10 May 1997 10:15:33 UTC