|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: SAX Proposal: new AttributesBuilder interface
----- Original Message ----- From: "John Cowan" <jcowan@r...> > The trouble with this scheme is that it blocks a very common implementation > technique. Since an Attribute object is valid only during a startElement > callback, there is no reason for a parser to ever instantiate more than > one such object, and indeed it is common for the SAXParser object to be > the object in question. I don't think it does block this technique. The SAX Parser must have at least one Attributes implementation somewhere to be able to call the SAX ContentHandler. If a particular SAX Parser wants to keep the same Attributes object throughout the entire parsing of a document, it can do that by implementing its own default AttributesBuilder to return the same Attributes object instance. e.g. the SAX Parser could implement both the Attributes and AttributesBuilder interfaces and return "this" in the AttributesBuilder.createAttributes() method. It is only in those cases where a SAX user (such as JDOM) wants to override the AttributesBuilder that new Attributes objects would get created for each element. J. James Strachan ============= email: james@m... web: http://www.metastuff.com If you are not the addressee of this confidential e-mail and any attachments, please delete it and inform the sender; unauthorised redistribution or publication is prohibited. Views expressed are those of the author and do not necessarily represent those of Citria Limited.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








