fdo#30825# someone needs to hold the originating node
This commit is contained in:
parent
4dafaa30e9
commit
2c8fc9289f
3 changed files with 5 additions and 4 deletions
|
@ -353,7 +353,7 @@ namespace XPath
|
|||
throw XPathException();
|
||||
}
|
||||
xmlXPathFreeContext(xpathCtx);
|
||||
Reference< XXPathObject > aObj(new CXPathObject(xpathObj));
|
||||
Reference< XXPathObject > aObj(new CXPathObject(xpathObj, contextNode));
|
||||
return aObj;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
namespace XPath
|
||||
{
|
||||
CXPathObject::CXPathObject(xmlXPathObjectPtr xpathObj)
|
||||
: m_pXPathObj(xpathObj, xmlXPathFreeObject)
|
||||
CXPathObject::CXPathObject(xmlXPathObjectPtr xpathObj, const Reference< XNode >& contextNode)
|
||||
: m_pXPathObj(xpathObj, xmlXPathFreeObject), m_xContextNode(contextNode)
|
||||
{
|
||||
switch (m_pXPathObj->type)
|
||||
{
|
||||
|
|
|
@ -52,10 +52,11 @@ namespace XPath
|
|||
{
|
||||
private:
|
||||
boost::shared_ptr<xmlXPathObject> m_pXPathObj;
|
||||
const Reference< XNode > m_xContextNode;
|
||||
XPathObjectType m_xPathObjectType;
|
||||
|
||||
public:
|
||||
CXPathObject(xmlXPathObjectPtr xpathObj);
|
||||
CXPathObject(xmlXPathObjectPtr xpathObj, const Reference< XNode >& contextNode);
|
||||
|
||||
/**
|
||||
get object type
|
||||
|
|
Loading…
Reference in a new issue