[ 
https://issues.apache.org/jira/browse/CAMEL-4700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154814#comment-13154814
 ] 

Hadrian Zbarcea commented on CAMEL-4700:
----------------------------------------

@Willem: I don't think so. I am aware of the thread, I just think nothing is 
broken. The issue was introduced in either r1201236 or r1202819 (didn't check 
exactly, but probably the latter) and the author probably only bothered to test 
camel-core, home of the XsltEndpoint, missing the side effect.

One feature added was the 'CamelXsltResourceUri' header, that allows one to 
specify an xslt stylesheet at runtime. You cannot necessarily assume that the 
xslt stylesheet passed as a header exists at route startup (could be for 
instance generated/copied by another route or process), but it must exists at 
the time the xslt endpoint processes the message. Now why would this be 
different for the stylesheet passed as an uri paramter? Another argument is 
that compiling the stylesheet is an expensive process and it doesn't need to be 
done until necessary. First use could happen much, much later after the route 
start and, again, the stylesheet may not be available when the route starts, 
but it would be available when the first message is received.

Of course, one could argue that if that is the case, one should use the 
'CamelXsltResourceUri' header. There is no overhead, because stylesheets are 
cached. To me, however, the uri parameter is used a default when the header is 
not specified (convention over configuration) and the endpoint behavior is 
consistent the way it is now.
                
> RegressionTest failure on camel-saxon @ 
> org.apache.camel.component.xslt.SaxonInvalidXsltFileTest
> ------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4700
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4700
>             Project: Camel
>          Issue Type: Task
>          Components: camel-saxon
>    Affects Versions: 2.9.0
>            Reporter: Babak Vahdat
>            Assignee: Hadrian Zbarcea
>            Priority: Trivial
>             Fix For: 2.9.0
>
>         Attachments: CAMEL-4700.patch
>
>
> See 
> http://camel.465427.n5.nabble.com/Unit-test-failure-on-trunk-in-camel-saxon-td5009713.html

--
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

        

Reply via email to