I've been trying to find a bug in my test suite and have thus far isolated
it to this:
XalanNode*
XPathExecutionContextDefault::getCurrentNode() const
{
--> return m_currentNodeStack.back();
}
XalanNode*
StylesheetExecutionContextDefault::getCurrentNode() const
{
--> return m_xpathExecutionContextDefault.getCurrentNode();
}
void
StylesheetExecutionContextDefault::warn(
const XalanDOMString& msg,
const XalanNode* sourceNode,
const LocatorType* locator) const
{
assert(m_xsltProcessor != 0);
if (sourceNode == 0)
{
--> sourceNode = getCurrentNode();
}
m_currentNodeStack is empty when StylesheetExecutionContextDefault::warn is
called. I've been provoking this by returning NULL in an EntityResolver when
the stylesheet is requested. Unfortunately, I have no real intuition for
this chunk of code so I don't know if m_currentNodeStack should ever be
empty when warn is called. In any case I'd recommend adding an assert before
the call to .back().
Cheers,
Brian