XSLT
Transform XML messages with an XSLT stylesheet.
What’s inside
-
XSLT component, URI syntax:
xslt:resourceUri
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-xslt-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 10 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.xslt.allow-template-from-header | Whether a message can replace the stylesheet of the endpoint with the CamelXsltResourceUri header (the URI of another stylesheet) or the CamelXsltStylesheet header (the stylesheet itself, compiled for each message). Enable it only when these headers are set by the route, not taken from incoming messages. | false | Boolean |
camel.component.xslt.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.xslt.content-cache | Whether the endpoints load and compile their stylesheet once, at startup, and reuse it for every message. When false, the stylesheet is loaded and compiled again for each message, which picks up changes during development. A cached stylesheet can be reloaded at runtime with the JMX operation clearCachedStylesheet. | true | Boolean |
camel.component.xslt.enabled | Whether to enable auto configuration of the xslt component. This is enabled by default. | Boolean | |
camel.component.xslt.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.xslt.transformer-factory-class | The fully qualified class name of the javax.xml.transform.TransformerFactory implementation to compile the stylesheets with, for the endpoints that do not set their own. | String | |
camel.component.xslt.transformer-factory-configuration-strategy | A strategy that configures the javax.xml.transform.TransformerFactory, for example its features or attributes, before the stylesheet is compiled with it. Used by the endpoints that do not set their own. The option is a org.apache.camel.component.xslt.TransformerFactoryConfigurationStrategy type. | TransformerFactoryConfigurationStrategy | |
camel.component.xslt.uri-resolver | A custom javax.xml.transform.URIResolver for the endpoints of this component that do not set their own: it loads the stylesheet, its xsl:include and xsl:import references, and the documents of the document() function. When set, uriResolverFactory is not used. The option is a javax.xml.transform.URIResolver type. | URIResolver | |
camel.component.xslt.uri-resolver-factory | A custom factory (org.apache.camel.component.xslt.XsltUriResolverFactory) that creates the javax.xml.transform.URIResolver of each endpoint from the resource URI of the endpoint, for example to resolve references relative to the stylesheet. Not used when uriResolver is set. The option is a org.apache.camel.component.xslt.XsltUriResolverFactory type. | XsltUriResolverFactory | |
camel.component.xslt.xpath-total-op-limit | The maximum total number of XPath operators in a stylesheet, set as the jdk.xml.xpathTotalOpLimit attribute on the TransformerFactory of each endpoint that does not set its own; a stylesheet that exceeds it fails to compile. 0 or less keeps the setting of the JDK, 10000 by default. A TransformerFactory that does not support this attribute, such as the one of Saxon, ignores it. | 10000 | Integer |