Hi Brian,
We definitely need at least an assertion, if not more. Are you saying you
returned an empty document for the primary stylesheet document, but we
still tried to execute? I wonder if the parser ought to be reporting a
fatal error for that case.
If not, can you describe in more detail exactly what you did?
Thanks!
Dave
|---------+--------------------------->
| | "Brian Quinlan" |
| | <[EMAIL PROTECTED]|
| | com> |
| | |
| | 03/03/2004 01:09|
| | AM |
| | Please respond |
| | to xalan-dev |
|---------+--------------------------->
>-------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: <[EMAIL PROTECTED]>
|
| cc: (bcc: David N Bertoni/Cambridge/IBM)
|
| Subject: Possible bug in StylesheetExecutionContextDefault::warn
|
>-------------------------------------------------------------------------------------------------------------------------------|
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