Lists Home |
Date Index |
- From: firstname.lastname@example.org (Peter Wilson)
- To: email@example.com
- Date: Thu, 01 Apr 1999 13:00:18 -0800
I believe that the class LexicalEventListener is the proposed basis for
the new javax.xml extension. In private conversation with Dave Brownwell
of Sun Microsystems I made the suggestions below. While refusing these
ideas Dave suggested that I poll the users on XML-DEV to determine their
reactions. I hope you will agree with these suggestions and contact Dave
1. The startElement() method should indicate if it is an empty element.
i.e. whether the element ends with a /> tag or not.
2. The proposed LexicalEventListenser interface should have new methods
startPCDATA() and endPCDATA(). Calls to these methods would bracket
calls to the current characters(...) method. The LexicalEventListener
interface already contains bracketing calls for start/endCDATA - why the
Better yet, the characters(..) method should be split into two:
CDATA(...) and PCDATA(..). The two method sets would then be
startPCDATA(), PCDATA()*, endPCDATA. ditto for CDATA.
Alternatively a single set: startCharacters(), characters(),
could be used with a flag on startCharacters to indicate parsed or
Dave argues that these method calls may be implemented by writing an
event filter to restructure the events as required. By this logic,
current extensions to LexicalEventListener are all equally pointless.
Was the addition of the start/endCDATA methods added solely for his
convenience in implementing XMLDocumentBuilder? Using the same argument
they should not be cluttering up the new interface.
My argument is that the new XML parsing facilities should not be skewed
by the need of one application (e.g. building Dom models). This is best
achieved by structuring lexical events for ALL syntactic structures.
The current LexicalEventListener interface is a step in the right
direction but is not complete.
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)