SAX2 RFD: LexicalHandler draft v.1.1

Bill la Forge b.laforge at jxml.com
Mon Mar 22 16:35:15 GMT 1999


From: Kay Michael <Michael.Kay at icl.com>
>It seems we are trying to provide two views of a document, the reader's view
>and the writer's view. The reader's view needs to present roughly what's in
>SAX1. The writer's view arguably should preserve all the arbitrary choices
>made by the document author, including whether to use CDATA or entity
>references or character references, where to put the line breaks, whether to
>use empty element syntax, where to put optional spaces, what kind of quotes
>to use round attributes, etc, etc. If we are retaining any of this for the
>benefit of people who want to edit the document, then logically we should
>retain all of it.


Beautiful. I think you have identified two distinct modes of operation. I think this
applies to namespaces as well. A reader has no need for the original prefix
and namespace processing should remove all the xmlns attributes, while a writter
may wish to preserve the information.

Perhaps we should have a writer feature that we can turn on or off, which will
give us two broadly different modes of operation. Other features may be
turned on or off individually, but the default for those features may well depend
on the use of the parser by a reader or a writer.

This also gives us a way to partition events--an interface for a set of events
should not include both reader and writer events.

Bill



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