Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase XSLT extension test coverage #3904

Closed
zhfeng opened this issue Jul 7, 2022 · 4 comments
Closed

Increase XSLT extension test coverage #3904

zhfeng opened this issue Jul 7, 2022 · 4 comments
Assignees
Labels
Milestone

Comments

@zhfeng
Copy link
Contributor

zhfeng commented Jul 7, 2022

  • complete URL (classpath, file, http, ref, bean)
  • different outputs (string, bytes, dom, file)
  • using xsl:include to include files
  • custom XsltUriResolverFactory
  • custom URIResolver
  • using org.apache.camel.component.xslt.XsltAggregationStrategy
  • caching
  • Being able to raise errors with xsl:message and messages getting into Exchange.XSLT_ERROR, Exchange.XSLT_FATAL_ERROR, or Exchange.XSLT_WARNING
@zhfeng zhfeng added the test label Jul 7, 2022
@zhfeng zhfeng added this to the 2.11.0 milestone Jul 7, 2022
@zhfeng zhfeng self-assigned this Jul 7, 2022
@zhfeng
Copy link
Contributor Author

zhfeng commented Jul 11, 2022

ref and bean URI will generate xslt templates dynamically at runtime. So I think it could not be supported in native mode.

@ppalaga
Copy link
Contributor

ppalaga commented Jul 11, 2022

ref and bean URI will generate xslt templates dynamically at runtime. So I think it could not be supported in native mode.

Yeah, those cases are harder, but still perhaps doable to some extent, as long as the XSLT stuff is known at build time. Of course, if the user generates XSLT resources dynamically at runtime, it won't work in native mode. But if he only has a @Named singleton bean that he uses in a ref URI, then it could perhaps work with some additional config or a new dedicated annotation, something like @XsltResource("foo/bar.xsl"). Then we could scan for those @XsltResource annotations at build time and simply replace ref:beanName for classpath:foo/bar.xsl. Maybe if we had buildtime routes introspection API even the additional config/annotation would not be needed.
I am not sure how much cases we could cover like this and I am not sure at all whether this is worth the effort. Perhaps not at this time, we might have more important things to do.

@zhfeng
Copy link
Contributor Author

zhfeng commented Jul 12, 2022

Thanks @ppalaga and I think these URIs such as refand bean should work at JVM mode at least. quarkus.camel.xslt.sources must be used for classpath: to work in native mode but it should work in JVM mode without this config and generate template at runtime dynamically.

@zhfeng
Copy link
Contributor Author

zhfeng commented Jul 12, 2022

There is a CAMEL-18266 issue with xslt:bean currently.

@zhfeng zhfeng modified the milestones: 2.11.0, 2.12.0 Jul 21, 2022
@jamesnetherton jamesnetherton modified the milestones: 2.12.0, 2.13.0 Sep 7, 2022
@zbendhiba zbendhiba modified the milestones: 2.13.0, 2.14 Sep 22, 2022
zhfeng added a commit to zhfeng/camel-quarkus that referenced this issue Oct 24, 2022
zhfeng added a commit to zhfeng/camel-quarkus that referenced this issue Oct 24, 2022
@zhfeng zhfeng closed this as completed in a749990 Oct 25, 2022
jamesnetherton pushed a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 31, 2022
jamesnetherton pushed a commit to jamesnetherton/camel-quarkus that referenced this issue Nov 2, 2022
jamesnetherton pushed a commit to jboss-fuse/camel-quarkus that referenced this issue Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants