You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raul Kripalani (Created) (JIRA)" <ji...@apache.org> on 2011/12/09 13:10:40 UTC

[jira] [Created] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Balance up xpath XML element with Java DSL equivalent
-----------------------------------------------------

                 Key: CAMEL-4759
                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
             Project: Camel
          Issue Type: Bug
          Components: camel-core, camel-saxon
    Affects Versions: 2.8.4, 2.9.0
            Reporter: Raul Kripalani


The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
* factory
* object model
* shortcut to use Saxon

These options should be implemented as attributes on the xpath XML element, e.g.:

{code}
<xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
{code}

{code}
<xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
{code}
(this one somehow feels ugly, is the objectModel supposed to be a namespace?)

{code}
<xpath saxon="true">...</xpath>
{code}

Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raul Kripalani updated CAMEL-4759:
----------------------------------

    Attachment: xpathBalancingAndNamespaceLogging.diff
    
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>         Attachments: xpathBalancingAndNamespaceLogging.diff
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173141#comment-13173141 ] 

Raul Kripalani commented on CAMEL-4759:
---------------------------------------

Patch attached. Users can now specify Saxon in three different ways in the <xpath /> Spring DSL element:
* saxon=true
* objectModel="http://saxon.sf.net/jaxp/xpath/om"
* factoryRef="ref to the bean of type XPathFactoryImpl"

saxon=true is a shortcut for setting the objectModel to the above value.
Added new logic to obtain the XPathFactory based on the objectModel URI on a per-instance basis. This was only being used to obtain the "defaultXPathFactory" which is set as a static field in the XPathBuilder.

Added a number of test cases to validate the changes. During initialisation, the XPathFactory system variable is set to force the JRE to use the platform default (Xalan), since having Saxon in the classpath will make the JRE pick it up due to Service Provider discovery. This does not happen in OSGi because the META-INF/services directory of the Saxon bundle is not exported (as Service Provider mechanism clashes with OSGi).

Also, added a toString() representation to DefaultNamespaceContext and a new log statement printed on TRACE level whenever a new XPath Expression is added to the pool, which also shows the Namespace context.

                
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>         Attachments: xpathBalancingAndNamespaceLogging.diff
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4759.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.10
    
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>            Assignee: Raul Kripalani
>             Fix For: 2.10
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Claus Ibsen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-4759:
-------------------------------

    Issue Type: Improvement  (was: Bug)
    
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raul Kripalani updated CAMEL-4759:
----------------------------------

    Issue Type: Sub-task  (was: Improvement)
        Parent: CAMEL-4799
    
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raul Kripalani updated CAMEL-4759:
----------------------------------

    Patch Info: Patch Available
    
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>         Attachments: xpathBalancingAndNamespaceLogging.diff
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174150#comment-13174150 ] 

Claus Ibsen commented on CAMEL-4759:
------------------------------------

I wonder if the XPathLanguageTest works on IBM JDKs and the likes? I assume they are happy and embed the SUN xpath factory?
                
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>         Attachments: xpathBalancingAndNamespaceLogging.diff
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186918#comment-13186918 ] 

Raul Kripalani commented on CAMEL-4759:
---------------------------------------

Documentation added on the XPath Expression Language page.
                
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>            Assignee: Raul Kripalani
>             Fix For: 2.10.0
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174782#comment-13174782 ] 

Raul Kripalani commented on CAMEL-4759:
---------------------------------------

Claus, it looks like there is no way to find what the platform default XPath implementation is.
ServiceLoader doesn't help because as the XPathFactory javadoc specifies...

{quote}
Platform default XPathFactory is located in a platform specific way. There must be a platform default XPathFactory for the W3C DOM, i.e. DEFAULT_OBJECT_MODEL_URI.
{quote}

In fact, in the Sun JDK the platform default XPathFactory is not even registered via META-INF/services. Maybe someone who has the IBM JDK installed could do a little investigation to find out the name of the default Impl class, and we could spice up the logic in this test to use that one if the JDK is IBM's.
                
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>         Attachments: xpathBalancingAndNamespaceLogging.diff
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raul Kripalani updated CAMEL-4759:
----------------------------------

    Attachment:     (was: xpathBalancingAndNamespaceLogging.diff)
    
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174159#comment-13174159 ] 

Raul Kripalani commented on CAMEL-4759:
---------------------------------------

That is a pretty good question. There should be at least two implementations on any JDK with the current project configuration: the Saxon one and the platform default. What do you think about using java.util.ServiceLoader<XPathFactory> to search all available implementations, discarding the Saxon one, thus sticking to the platform default?
                
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>         Attachments: xpathBalancingAndNamespaceLogging.diff
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174813#comment-13174813 ] 

Babak Vahdat commented on CAMEL-4759:
-------------------------------------

Hi Raul,

Until IBM JDK-5 they used to have only [1] as the only XPathFactory Impl and IBM JDK-6 (which is our concern)
provides both [1] & [2]. However [1] still seems to be the default.

As you've already mentioned the generic ServiceLoader mechanism (of Mark Reinhold) is (unfortunately) not used here as well and the IBM JDK goes through some proprietary steps similiar to below to load the defaults:

- first use the factory using the set system properties
- then through a jaxp.properties (inside JRE) with entries pointing what the default Impl is to be used for JAXP, Transformation, Validation APIs etc.
- if still not found go for some hard-coded defaults

Just as an extra note: Using [2] I used to have some memory-leak issues but had nothing to do with Camel
And just as the last note: I LOVE the glasses you wear as they're simply cool :-)

[1] org.apache.xpath.jaxp.XPathFactoryImpl
[2] com.ibm.xtq.xpath.jaxp.XPathFactoryImpl

                
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>         Attachments: xpathBalancingAndNamespaceLogging.diff
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Claus Ibsen (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-4759:
----------------------------------

    Assignee: Raul Kripalani
    
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>            Assignee: Raul Kripalani
>             Fix For: 2.10
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178699#comment-13178699 ] 

Raul Kripalani commented on CAMEL-4759:
---------------------------------------

Done. Now checking if vendor is IBM and only running tests if not.
Cannot use JUnit Assume to conditionally skip tests because this test cases are based on JUnit 3.8.
To use JUnit 4 we'd have to import camel-test (to use {{org.apache.camel.test.junit4.CamelSpringTestSupport}}), but this means creating yet another intra-project dependency and I'm not sure whether it's the way to go. So instead, the tests are skipped by immediately returning (consequently counting the test as passed instead of skipped).

I've moved the patch from this subtask to the parent task.

P.S.: Babak, thanks! You mean my avatar on Twitter? I've changed it now though ;)
                
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Raul Kripalani (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166121#comment-13166121 ] 

Raul Kripalani commented on CAMEL-4759:
---------------------------------------

I'll try and provide a patch soon.
                
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4759) Balance up xpath XML element with Java DSL equivalent

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174838#comment-13174838 ] 

Claus Ibsen commented on CAMEL-4759:
------------------------------------

We can just check if the java vendor is oracle/sun, and then run the test. For other vendors its fine to skip.
It's fine, we cannot solve all the worlds problems. We have some tests that dont run on IBM or Windows etc. 
                
> Balance up xpath XML element with Java DSL equivalent
> -----------------------------------------------------
>
>                 Key: CAMEL-4759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4759
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-saxon
>    Affects Versions: 2.8.4, 2.9.0
>            Reporter: Raul Kripalani
>         Attachments: xpathBalancingAndNamespaceLogging.diff
>
>
> The <xpath> XML element in Spring DSL doesn't allow to set the following options which are available on Java DSL:
> * factory
> * object model
> * shortcut to use Saxon
> These options should be implemented as attributes on the xpath XML element, e.g.:
> {code}
> <xpath factory="net.sf.saxon.xpath.XPathFactoryImpl">...</xpath>
> {code}
> {code}
> <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">...</xpath>
> {code}
> (this one somehow feels ugly, is the objectModel supposed to be a namespace?)
> {code}
> <xpath saxon="true">...</xpath>
> {code}
> Only one should be allowed at a time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira