Project

Profile

Help

Dealing with Receiver#startContent()

Added by Anonymous over 17 years ago

Legacy ID: #3971559 Legacy Poster: KarstenF (karsten_f)

Hallo, I think there is an bug in org.cdlib.xtf.lazyTree.ElementImpl#copy It called Receiver#startElement and Receiver#endElement but not Receiver#startContent() JavaDoc told us to call it after "completion of all attributes and namespaces" and this can possibly happend in #copy. In xtf (they copied the source-code) I get a EmptyStackException in net.sf.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:282) Did I misunderstood Receiver#startContent() ? Karsten


Replies (4)

Please register to reply

RE: Dealing with Receiver#startContent() - Added by Anonymous over 17 years ago

Legacy ID: #3971604 Legacy Poster: Michael Kay (mhkay)

>I think there is an bug in org.cdlib.xtf.lazyTree.ElementImpl#copy That code isn't part of Saxon. You will have to find out whose code it is, and contact them directly. Michael Kay

RE: Dealing with Receiver#startContent() - Added by Anonymous over 17 years ago

Legacy ID: #3971613 Legacy Poster: KarstenF (karsten_f)

Question is for net.sf.saxon.tree.ElementImpl#copy (for xtf I know it produced errors)

RE: Dealing with Receiver#startContent() - Added by Anonymous over 17 years ago

Legacy ID: #3971634 Legacy Poster: Michael Kay (mhkay)

Yes, you're right, there should be a call on startContent. Many implementations of Receiver don't mind if it's omitted, which is why the problem hasn't been discovered before, but if you call copy() and send the output to a Receiver that does care, it will crash.

RE: Dealing with Receiver#startContent() - Added by Anonymous over 17 years ago

Legacy ID: #3975225 Legacy Poster: KarstenF (karsten_f)

My Receiver: I used SAXResult to build a Cocoon-Generator. (org.apache.cocoon.xml.AbstractXMLProducer#contentHandler) Thank you very much for the fast answer! Karsten

    (1-4/4)

    Please register to reply