ModSAX: Proposed Core Properties

David Megginson david at megginson.com
Wed Mar 17 21:15:17 GMT 1999


Ronald Bourret writes:
 > David Megginson wrote:
 > 
 > > So far, for consistency, I've made all pre-parse properties
 > > write-only and all parse-time properties read-only.  We'll have
 > > to think about this one.
 > 
 > What is the possible benefit of making any property write-only?
 > That is, can any harm ever come from reading a property?

There are three benefits:

1. Keep the API absolutely as small as possible.
2. Avoid confusion.
3. Allow properties to be unknown until set.

Any attempt to access a property can generate a
SAXNotSupportedException (or the derived SAXNotRecognizedException),
but there is no guarantee that they will be symmetrical.  For example,
a driver built on top of a parser might allow you to set the namespace
separator but not to query it, or vice-versa.


All the best,


David

-- 
David Megginson                 david at megginson.com
           http://www.megginson.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/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list