You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Wing Yew Poon (JIRA)" <xm...@xml.apache.org> on 2008/05/20 04:34:55 UTC

[jira] Commented: (XMLBEANS-373) pluggable XPath/XQuery engine support

    [ https://issues.apache.org/jira/browse/XMLBEANS-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598161#action_12598161 ] 

Wing Yew Poon commented on XMLBEANS-373:
----------------------------------------

Currently, there is a class, SaxonXBeansDelegate, containing 2 nested interfaces that are implemented by the 2 classes in xbean_xpath.jar, which constitute Saxon glue code.
The changes I have made are as follows:
- Refactor SaxonXBeansDelegate (removed) into PathDelegate and QueryDelegate.
- Refactor Path and Query to use PathDelegate and QueryDelegate respectively if using a delegated engine.
New XmlOptions keys,  Path.PATH_DELEGATE_INTERFACE and Query.QUERY_DELEGATE_INTERFACE are introduced. Set the values to names of the classes implementing PathDelegate.SelectPathInterface and QueryDelegate.QueryInterface. These classes can be implemented by users to be glue code to their engine of choice.
XmlOptions can be used on a per call basis. On a global basis, the names of the classes are found by looking for files in META-INF/services with file name the respective interface.
- Classes in xbean_xpath.jar now implement PathDelegate.SelectPathInterface and QueryDelegate.QueryInterface, and files with the interface names (containing the implementation class names) are copied to META-INF/services.
- Additional XmlOptions keys, Path._useDelegateForXpath and Query._useDelegateForXQuery are introduced to force the use of the delegated engine.


> pluggable XPath/XQuery engine support
> -------------------------------------
>
>                 Key: XMLBEANS-373
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-373
>             Project: XMLBeans
>          Issue Type: Improvement
>          Components: XPath
>    Affects Versions:  Version 2.3
>            Reporter: Wing Yew Poon
>            Assignee: Wing Yew Poon
>             Fix For: TBD
>
>         Attachments: delegate_diff2.txt
>
>
> This is an enhancement proposal.
> Currently, XMLBeans looks for certain engines in certain orders to process XPath/XQuery expressions. In particular, it searches for the Saxon XQuery engine. There has been a request (XMLBEANS-366) to support the use of JXPath for processing XPath expressions. The patch from the user changes the engine lookup logic to add looking for JXPath if Saxon is not found. I propose to make the choice of engine more pluggable instead of hardcoding logic to lookup Saxon/JXPath/etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org