You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Sean MacRoibeaird - Sun ireland - Solaris Software - Staff Engineer <Se...@ireland.sun.com> on 2000/04/26 15:38:13 UTC
Xpath/FunctionDocLocation.cpp & Xpath/FunctionDocLocation.hpp
I've got a question on these particular files. I'm in the process of compiling
Xalan-C on Solaris 2.8 using the SC5.0 compiler.
The compiler threw up some errors on these files and upon examination I could
not see that they could have ever been compiled correctly. I would appreciate
any feedback on this.
1. The method below hides the virtual function in the base class - irritating,
but no big deal....
virtual XObject*
execute(PathExecutionContext& executionContext,
const DOM_Node& context,
int
/* opPos */,
const std::vector<XObject*>& args);
2. The following error is generated in the execute() method.#
line 109: Error: Cannot assign XalanNode* to DOM_Node without
"DOM_Node::operator=(const DOM_Node&)";
XObject* firstArg = args[0];
const NodeRefListBase& nl = firstArg->nodeset();
if(nl.getLength() > 0)
{
ERROR LINE---> whereNode = nl.item(0);
I can't see that this could ever have worked:
1. There is no relationship between a XalanNode * and a DOM_Node. A XalanNode*
is returned from NodeRefListBase::item(unsigned int index).
2. Given that there is no relationship between DOM_Node and XalanNode*, there
would need to be an overloaded operator in the DOM_Node class, which would
require Xerces to have access to the Xalan hearders.
I could just define a new virtual method in NodeRefListBase which returns a
DOM_Node &, but I woudl rather understand what is going on here before hacking
around with the code.
Regards,
Sean MacRoibeaird