You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jon Smirl <jo...@mediaone.net> on 2000/06/16 05:22:39 UTC
Xalan-C: stylesheethandler.cpp
I forgot to put a version attribute on my xsl:stylesheet element. This
causes a SAXException to be thrown in StylesheetHandler::startElement().
The m_elemStack is empty at this point so it GPF's in the while loop.
// Here's the story. startElement throws exceptions for certain malformed
constructs. These
// exceptions need to reach the end user. But the parser eats all
exceptions and we lose
// the error messages and exit silently. So, I'll eat the exceptions
first, store the message
// and then throw the exception during endDocument
catch(SAXException& e)
{
m_exceptionPending = true;
// Pop anything that's not an empty element...
while(m_elemStack.back()->getXSLToken() != Constants::ELEMNAME_UNDEFINED)
{
m_elemStack.pop_back();
}
m_pendingException = e.getMessage();
}
Jon Smirl
jonsmirl@mediaone.net