SAX and whitespace (was Re: Problems with whitespace and
ak117 at freenet.carleton.ca
Sat Jan 3 12:37:51 GMT 1998
Peter Murray-Rust writes:
> - is it possible for an author to extend SAX with additional non-SAX
> calls? [In the same way as a C library may have the standard calls and some
> additional manufacturer-specific ones]. Thus if we agree that doNotation
> functionality is not part of SAX, could a core SAX interface be extended by
> a parser writer without breaking the SAX bit? [I assume yes, but I don't
> know about interface design].
If you're discussing the parser class, then it is free to implement
any functionality beyond the interface; if you are discussing the
application (call-back) class, then there are two choices:
1) it may implement another, tool-specific interface as well as SAX;
2) it may implement an interface that extends the SAX interface (say,
by adding lexical events like comments or by adding DTD events).
In either case, you could still use your application class with other
XML parsers, but the additional methods would never be called.
> - if it *is* possible to extend it in this way, can we make sure we get
> the core as simple as possible so we all agree on it? Parser writers can
> then add additional non-standard functionality [carefully documented, of
> course :-)]
> - there is enormous value for hackers like me to be able to find a simple
> core functionality and get that working rapidly. Then the additional
> features can be gradually brought in.
True, but it's never quite so simple, because every parser writer
would implement the additional functionality in a different way. We
have to make certain that we have covered at least the core features,
and that means that we have to agree on what the core features are
(I'll follow up with a separate message).
> - what is the position on error handling? In GUI applications like JUMBO
> it's important to let the user know what is happening, so I have trapped
> the AElfred errors.
I think that we may want to distinguish fatal errors from warnings
(although Ælfred doesn't currently do so). Normally, a warning would
print a message to a log or to STDERR, while an error would throw a
java.lang.Error or a java.lang.Exception.
All the best,
David Megginson ak117 at freenet.carleton.ca
Microstar Software Ltd. dmeggins at microstar.com
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