xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Quinlan" <br...@sweetapp.com>
Subject Possible bug in StylesheetExecutionContextDefault::warn
Date Wed, 03 Mar 2004 09:09:53 GMT
I've been trying to find a bug in my test suite and have thus far isolated
it to this:

XPathExecutionContextDefault::getCurrentNode() const
-->  return m_currentNodeStack.back();

StylesheetExecutionContextDefault::getCurrentNode() const
-->  return m_xpathExecutionContextDefault.getCurrentNode();

 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().


View raw message