To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=61370





------- Additional comments from [EMAIL PROTECTED] Thu Mar  1 09:35:30 +0000 
2007 -------
I stumbled over the same bug using OOo macros (see: http://www.oooforum.org/
forum/viewtopic.phtml?t=53759) and did a bit of research. 

According to the DOM XPath specifications (see: http://www.w3.org/TR/DOM-Level-
3-XPath/xpath.html#XPathExpression-evaluate) context node should be the node 
from where the expression is evaluated. This is also the (expected) behavior 
implemented in Xerces and MSXML.

Looking into the source of the OOo implementation of the XPath evaluation 
(unoxml\source\xpath\xpathapi.cxx) and there into the 'eval' and 
'selectNodeList' functions it is clear, that the evaluation of XPath 
expressions in the context of an element other than the root element is not 
possible as the function call for the evaluation is always done with the 
document node.

Without any further investigation, the problem seems to be the usage of 
xmlXPathNewContext with accepts only a document node as parameter (http://
xmlsoft.org/html/libxml-xpath.html#xmlXPathNewContext). The returned context is 
a structure that also contains a 'node' member. Maybe it helps to set this 
'node' member before calling xmlXPathEval.

According to the mailing list for libxml this should work (see for example 
http://mail.gnome.org/archives/xml/2006-October/msg00009.html).

Hope this helps to implement this feature in the near future. Thanks.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to