[ 
https://issues.apache.org/jira/browse/CAMEL-19918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adriano Marcondes Machado updated CAMEL-19918:
----------------------------------------------
    Description: 
I have a Spring Boot project, and I'm trying to set Saxon as the default 
implementation for the XPath language.

Per the 
[documentation]([https://camel.apache.org/components/4.0.x/languages/xpath-language.html#_sb_option_camel_language_xpath_saxon]),
 you can set the property *{*}camel.language.xpath.saxon{*}* to true to enable 
it.

However, the Spring Boot runtime configures the language by doing a reflective 
copy of the properties from the configuration to the language instance object. 
It happens that the property names are different: 
[XPathLanguage.java]([https://github.com/apache/camel/blob/main/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java#L100-L106]})
 uses "useSaxon" whereas 
[XPathLanguageConfiguration.java]([https://github.com/apache/camel-spring-boot/blob/main/components-starter/camel-xpath-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java])
 uses "saxon".

There's an unit test covering this setting, but it is using 
["useSaxon"]([https://github.com/apache/camel/blob/main/components/camel-saxon/src/test/resources/org/apache/camel/language/xpath/XPathLanguageDefaultSettingsTest.xml#L29-L31]).

  was:
I have a Spring Boot project, and I'm trying to set Saxon as the default 
implementation for the XPath language.

Per the 
[documentation](https://camel.apache.org/components/4.0.x/languages/xpath-language.html#_sb_option_camel_language_xpath_saxon),
 you can set the property **camel.language.xpath.saxon** to true to enable it.

However, the Spring Boot runtime configures the language by doing a reflective 
copy of the properties from the configuration to the language instance object. 
It happens that the property names are different: 
[XPathLanguage.java](https://github.com/apache/camel/blob/main/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java#L100-L106})
 uses "useSaxon" whereas 
[XPathLanguageConfiguration.java](https://github.com/apache/camel-spring-boot/blob/main/components-starter/camel-xpath-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java)
 uses "saxon".

There's an unit test covering this setting, but it is using 
["useSaxon"](https://github.com/apache/camel/blob/main/components/camel-saxon/src/test/resources/org/apache/camel/language/xpath/XPathLanguageDefaultSettingsTest.xml#L29-L31).
 Is this a typo on the Spring Boot runtime?


> >Saxon as the default XPath implementation
> ------------------------------------------
>
>                 Key: CAMEL-19918
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19918
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-saxon
>    Affects Versions: 4.0.0
>            Reporter: Adriano Marcondes Machado
>            Priority: Minor
>
> I have a Spring Boot project, and I'm trying to set Saxon as the default 
> implementation for the XPath language.
> Per the 
> [documentation]([https://camel.apache.org/components/4.0.x/languages/xpath-language.html#_sb_option_camel_language_xpath_saxon]),
>  you can set the property *{*}camel.language.xpath.saxon{*}* to true to 
> enable it.
> However, the Spring Boot runtime configures the language by doing a 
> reflective copy of the properties from the configuration to the language 
> instance object. It happens that the property names are different: 
> [XPathLanguage.java]([https://github.com/apache/camel/blob/main/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java#L100-L106]})
>  uses "useSaxon" whereas 
> [XPathLanguageConfiguration.java]([https://github.com/apache/camel-spring-boot/blob/main/components-starter/camel-xpath-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java])
>  uses "saxon".
> There's an unit test covering this setting, but it is using 
> ["useSaxon"]([https://github.com/apache/camel/blob/main/components/camel-saxon/src/test/resources/org/apache/camel/language/xpath/XPathLanguageDefaultSettingsTest.xml#L29-L31]).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to