SAX: Error Reporting (question 4 of 10)
papresco at technologist.com
Sun Jan 4 02:15:50 GMT 1998
David Megginson wrote:
> - Java already has throwable errors and exceptions, which provide a
> more elegant method for error reporting.
I don't think that they are very elegant this case. By the time the
exception is caught, the continuation (stack and stack pointer, for
non-Scheme programmers) has been lost. Continuing the parse is
problematic (as you pointed out).
> We can have the following default implementations in XmlAppBase:
As long as the default implementations in XmlAppBase are only 1 line,
then I don't think DavidO has much to worry about for implementors in
> If we decide to implement startEntity() and endEntity(), then the
> systemID argument to these methods will be redundant (the current URI
> will always be known); in that case, should we still leave the
> systemID argument in for convenience?
I would prefer a getCurrentLocation() method that can be called
> Do we need a 'column' argument as well as a 'line' argument, or is
> 'line' enough? I don't know if all parsers track the current column,
> but we could define a behaviour for those that do not (such as
> reporting the column as -1).
I'm not big on that last idea. It adds complexity to the spec. and to
applications. Careless implementors will report errors on line "-1" or
Either require it or don't. I would vote to require it.
Art is always at peril in universities, where there are so many people,
young and old, who love art less than argument, and dote upon a text
that provides the nutritious pemmican on which scholars love to chew.
-- Robertson Davies in "The Cunning Man"
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev