2005-05-27 16:27:29 UTC
I have been getting an EmptyStackException (or ArrayIndexOutOfBoundsException depending on the version of the parser/jre) when I use Xerces/Xalan in place of Saxon.
After some hair pulling, I found what appears to be an issue in com.presentingxml.components.inverserecordmapping.XmlRecordReader:
endElement is called twice on the last element of the input being processed. Saxon's content handler is forgiving of this error, but Xerces is not.
I've commented line 162 and now it seems to work fine:
//saxEventBufferBuilder.endElement(namespaceUri,localName,qName);
Is there a reason that endElement is called again? Dan, if you want I can send you a simple testcase that recreates the problem.