Community
Participate
Working Groups
Currently the XPath view only uses Xalan's XPath implementation for 1.0 to provide the results. We need to add use of the now fully functional XPath 2.0 PsychoPath processor for executing XPath 2.0 expressions. Ideally this should be contributed through extension point, but this first round will probably just use the built in support for PsychoPath and Xalan processors. Users should be able to specify a default, and there does need to be a way to specify namespaces. Menu items need to be contributed using the org.eclipse.ui.menus extension point and the command/handler framework.
I've added a menu item for editing the Namespaces. Next up is the selection of the XPath Parser Version to use 1.0 or 2.x
Created attachment 154725 [details] Adds rudementry support for XPath 2.0 Processor This patch adds very rudimentry support for XPath 2.0 processor support. It defaults the processor to the PsychoPath processor by default. Need to make this a tweakable option via the View Preferences. At the moment it only supports wrappig a ResultSequence and returning a NodeList. It doesn't support returning the other sequence types that can occur. Jesper your thoughts and ideas on extending this to full support of the ResultSequence interface that is returned would be appreciated. I'm not checking this in just yet.
Created attachment 154726 [details] mylyn/context/zip
The xpath view has been enhanced to allow the selection of either an XPath 1.0 or XPath 2.0 processor for executing the xpath statement. Selection of which processor is to be used is done through the View menu under the processor extension point. It leverages the command and handler framework, so adopters can add their own implementations. For XPath 2.0 this still works best with those queries that return Nodes, the result sequences are converted into a NodeList for rendering into the view. When using XPath 2.0 the expressions are not schema aware due to the fact that the WTP DOM doesn't provide the necessary PSVI infoset interfaces. Marking as fixed.
checked in and tagged.