Sylvain Wallez wrote: > Now we should also consider javax.xml.sax.SAXResult that holds a > ContentHandler and an optional LexicalHandler, and has an interesting > SystemId property that could be used to propagate a base URI from one > component to the next one without relying on an external resolver context. Ah interesting idea.
> And the fact that SAXResult _holds_ the handlers rather than > implementing the interfaces can in many cases avoid a level of wrapping > as the one mentioned above. Yepp > But the properties in SAXResult are mutable and the javadocs don't > specify when these properties can change, i.e. if a producer should call > getHandler() every time it needs to produce events of if the value can > be kept for the whole stream of events, even if I think the second case > is the most often used. Ah too bad :( > > So in the end, using a ContentHandler that optionally implements > LexicalHandler looks like the simplest and most robust solution. Yes, it seems better than relying on a not clearly specified assumption (btw, if the sax result just has a content handler, this should be tried to be casted to a lexical handler as well, so we are in good company) Carsten -- Carsten Ziegeler [email protected]
