Re: error recovery

On 2/19/2012 1:13 PM, Liam R E Quin wrote:
> The SAX parsers that report an error at the</b>  not matching the<a>
> are not I think out of spec.

No, but they are in a sense beyond the spec, doing some of what XML-ER will 
do. As far as I know, the XML Spec says nothing about a non-well formed 
document, except that it is not well formed. It doesn't define the 
occurrence of elements in the well-formed prefix of the example, etc. Thus, 
the SAX parser in my example is going well beyond what is documented in the 
normative specification. Those who are not aware of this may trust the 
information included with SAX events for elements like <x>, perhaps not 
even waiting for the final </a>, and this trusting information that is 
highly suspect.

In any case, reporting those elements goes well beyond what is defined in 
the XML specification. It's not clear that there is a normative 
specification for such behavior, at least insofar as SAX is formally 
defined as operating on well-formed XML.

Noah

Received on Sunday, 19 February 2012 18:57:57 UTC