You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/09/21 12:16:18 UTC

[camel] branch xslt2 created (now fa3096c9eae)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch xslt2
in repository https://gitbox.apache.org/repos/asf/camel.git


      at fa3096c9eae CAMEL-19889: camel-xslt - Add option allowTemplateFromHeader

This branch includes the following new commits:

     new fa3096c9eae CAMEL-19889: camel-xslt - Add option allowTemplateFromHeader

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel] 01/01: CAMEL-19889: camel-xslt - Add option allowTemplateFromHeader

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch xslt2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit fa3096c9eae3491ebe1759c677343143f48e1956
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Sep 21 14:16:04 2023 +0200

    CAMEL-19889: camel-xslt - Add option allowTemplateFromHeader
---
 .../org/apache/camel/catalog/components/xj.json          |  2 +-
 .../org/apache/camel/catalog/components/xslt-saxon.json  |  2 +-
 .../org/apache/camel/catalog/components/xslt.json        |  2 +-
 .../resources/org/apache/camel/component/xj/xj.json      |  2 +-
 .../apache/camel/component/xslt/saxon/xslt-saxon.json    |  2 +-
 .../camel/component/xslt/saxon/XsltSaxonEndpoint.java    |  4 ++--
 .../resources/org/apache/camel/component/xslt/xslt.json  |  2 +-
 .../org/apache/camel/component/xslt/XsltEndpoint.java    | 15 ++++++++-------
 .../builder/endpoint/dsl/XJEndpointBuilderFactory.java   | 16 ++++++++--------
 .../builder/endpoint/dsl/XsltEndpointBuilderFactory.java | 16 ++++++++--------
 .../endpoint/dsl/XsltSaxonEndpointBuilderFactory.java    | 16 ++++++++--------
 11 files changed, 40 insertions(+), 39 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xj.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xj.json
index 14a482f6518..63f432fb0c4 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xj.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xj.json
@@ -43,7 +43,7 @@
     "resourceUri": { "index": 0, "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Path to the template. The following is supported by the default URIResolver. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath i [...]
     "allowStAX": { "index": 1, "kind": "parameter", "displayName": "Allow StAX", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) does not support StAXSource." },
     "allowTemplateFromHeader": { "index": 2, "kind": "parameter", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential s [...]
-    "contentCache": { "index": 3, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be for [...]
+    "contentCache": { "index": 3, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet [...]
     "deleteOutputFile": { "index": 4, "kind": "parameter", "displayName": "Delete Output File", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If you have output=file then this option dictates whether or not the output file should be deleted when the Exchange is done processing. For example suppose the output file is a temporary file, then it ca [...]
     "failOnNullBody": { "index": 5, "kind": "parameter", "displayName": "Fail On Null Body", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not to throw an exception if the input body is null." },
     "output": { "index": 6, "kind": "parameter", "displayName": "Output", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xslt.XsltOutput", "enum": [ "string", "bytes", "DOM", "file" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "string", "description": "Option to specify which output type to use. Possible values are: string, bytes, DOM, file. The first three options are all in memory based, whe [...]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xslt-saxon.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xslt-saxon.json
index 2fd30414965..4f4d2b3d515 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xslt-saxon.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xslt-saxon.json
@@ -43,7 +43,7 @@
     "resourceUri": { "index": 0, "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Path to the template. The following is supported by the default URIResolver. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath i [...]
     "allowStAX": { "index": 1, "kind": "parameter", "displayName": "Allow StAX", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) does not support StAXSource." },
     "allowTemplateFromHeader": { "index": 2, "kind": "parameter", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential s [...]
-    "contentCache": { "index": 3, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be for [...]
+    "contentCache": { "index": 3, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet [...]
     "deleteOutputFile": { "index": 4, "kind": "parameter", "displayName": "Delete Output File", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If you have output=file then this option dictates whether or not the output file should be deleted when the Exchange is done processing. For example suppose the output file is a temporary file, then it ca [...]
     "failOnNullBody": { "index": 5, "kind": "parameter", "displayName": "Fail On Null Body", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not to throw an exception if the input body is null." },
     "output": { "index": 6, "kind": "parameter", "displayName": "Output", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xslt.XsltOutput", "enum": [ "string", "bytes", "DOM", "file" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "string", "description": "Option to specify which output type to use. Possible values are: string, bytes, DOM, file. The first three options are all in memory based, whe [...]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xslt.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xslt.json
index 0481baed38b..45824578244 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xslt.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/xslt.json
@@ -38,7 +38,7 @@
   "properties": {
     "resourceUri": { "index": 0, "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Path to the template. The following is supported by the default URIResolver. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath i [...]
     "allowTemplateFromHeader": { "index": 1, "kind": "parameter", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential s [...]
-    "contentCache": { "index": 2, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be for [...]
+    "contentCache": { "index": 2, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet [...]
     "deleteOutputFile": { "index": 3, "kind": "parameter", "displayName": "Delete Output File", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If you have output=file then this option dictates whether or not the output file should be deleted when the Exchange is done processing. For example suppose the output file is a temporary file, then it ca [...]
     "failOnNullBody": { "index": 4, "kind": "parameter", "displayName": "Fail On Null Body", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not to throw an exception if the input body is null." },
     "output": { "index": 5, "kind": "parameter", "displayName": "Output", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xslt.XsltOutput", "enum": [ "string", "bytes", "DOM", "file" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "string", "description": "Option to specify which output type to use. Possible values are: string, bytes, DOM, file. The first three options are all in memory based, whe [...]
diff --git a/components/camel-xj/src/generated/resources/org/apache/camel/component/xj/xj.json b/components/camel-xj/src/generated/resources/org/apache/camel/component/xj/xj.json
index 14a482f6518..63f432fb0c4 100644
--- a/components/camel-xj/src/generated/resources/org/apache/camel/component/xj/xj.json
+++ b/components/camel-xj/src/generated/resources/org/apache/camel/component/xj/xj.json
@@ -43,7 +43,7 @@
     "resourceUri": { "index": 0, "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Path to the template. The following is supported by the default URIResolver. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath i [...]
     "allowStAX": { "index": 1, "kind": "parameter", "displayName": "Allow StAX", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) does not support StAXSource." },
     "allowTemplateFromHeader": { "index": 2, "kind": "parameter", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential s [...]
-    "contentCache": { "index": 3, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be for [...]
+    "contentCache": { "index": 3, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet [...]
     "deleteOutputFile": { "index": 4, "kind": "parameter", "displayName": "Delete Output File", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If you have output=file then this option dictates whether or not the output file should be deleted when the Exchange is done processing. For example suppose the output file is a temporary file, then it ca [...]
     "failOnNullBody": { "index": 5, "kind": "parameter", "displayName": "Fail On Null Body", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not to throw an exception if the input body is null." },
     "output": { "index": 6, "kind": "parameter", "displayName": "Output", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xslt.XsltOutput", "enum": [ "string", "bytes", "DOM", "file" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "string", "description": "Option to specify which output type to use. Possible values are: string, bytes, DOM, file. The first three options are all in memory based, whe [...]
diff --git a/components/camel-xslt-saxon/src/generated/resources/org/apache/camel/component/xslt/saxon/xslt-saxon.json b/components/camel-xslt-saxon/src/generated/resources/org/apache/camel/component/xslt/saxon/xslt-saxon.json
index 2fd30414965..4f4d2b3d515 100644
--- a/components/camel-xslt-saxon/src/generated/resources/org/apache/camel/component/xslt/saxon/xslt-saxon.json
+++ b/components/camel-xslt-saxon/src/generated/resources/org/apache/camel/component/xslt/saxon/xslt-saxon.json
@@ -43,7 +43,7 @@
     "resourceUri": { "index": 0, "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Path to the template. The following is supported by the default URIResolver. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath i [...]
     "allowStAX": { "index": 1, "kind": "parameter", "displayName": "Allow StAX", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) does not support StAXSource." },
     "allowTemplateFromHeader": { "index": 2, "kind": "parameter", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential s [...]
-    "contentCache": { "index": 3, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be for [...]
+    "contentCache": { "index": 3, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet [...]
     "deleteOutputFile": { "index": 4, "kind": "parameter", "displayName": "Delete Output File", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If you have output=file then this option dictates whether or not the output file should be deleted when the Exchange is done processing. For example suppose the output file is a temporary file, then it ca [...]
     "failOnNullBody": { "index": 5, "kind": "parameter", "displayName": "Fail On Null Body", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not to throw an exception if the input body is null." },
     "output": { "index": 6, "kind": "parameter", "displayName": "Output", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xslt.XsltOutput", "enum": [ "string", "bytes", "DOM", "file" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "string", "description": "Option to specify which output type to use. Possible values are: string, bytes, DOM, file. The first three options are all in memory based, whe [...]
diff --git a/components/camel-xslt-saxon/src/main/java/org/apache/camel/component/xslt/saxon/XsltSaxonEndpoint.java b/components/camel-xslt-saxon/src/main/java/org/apache/camel/component/xslt/saxon/XsltSaxonEndpoint.java
index 5dc002252d1..9b22ac73280 100644
--- a/components/camel-xslt-saxon/src/main/java/org/apache/camel/component/xslt/saxon/XsltSaxonEndpoint.java
+++ b/components/camel-xslt-saxon/src/main/java/org/apache/camel/component/xslt/saxon/XsltSaxonEndpoint.java
@@ -169,7 +169,7 @@ public class XsltSaxonEndpoint extends XsltEndpoint {
 
         // must load resource first which sets a template and do a stylesheet compilation to catch errors early
         // load resource from classpath otherwise load in doStart()
-        if (ResourceHelper.isClasspathUri(getResourceUri())) {
+        if (isContentCache() && ResourceHelper.isClasspathUri(getResourceUri())) {
             loadResource(getResourceUri(), getXslt());
         }
 
@@ -180,7 +180,7 @@ public class XsltSaxonEndpoint extends XsltEndpoint {
     protected void doStart() throws Exception {
         super.doStart();
 
-        if (!ResourceHelper.isClasspathUri(getResourceUri())) {
+        if (isContentCache() && !ResourceHelper.isClasspathUri(getResourceUri())) {
             loadResource(getResourceUri(), getXslt());
         }
     }
diff --git a/components/camel-xslt/src/generated/resources/org/apache/camel/component/xslt/xslt.json b/components/camel-xslt/src/generated/resources/org/apache/camel/component/xslt/xslt.json
index 0481baed38b..45824578244 100644
--- a/components/camel-xslt/src/generated/resources/org/apache/camel/component/xslt/xslt.json
+++ b/components/camel-xslt/src/generated/resources/org/apache/camel/component/xslt/xslt.json
@@ -38,7 +38,7 @@
   "properties": {
     "resourceUri": { "index": 0, "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Path to the template. The following is supported by the default URIResolver. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath i [...]
     "allowTemplateFromHeader": { "index": 1, "kind": "parameter", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential s [...]
-    "contentCache": { "index": 2, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be for [...]
+    "contentCache": { "index": 2, "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet [...]
     "deleteOutputFile": { "index": 3, "kind": "parameter", "displayName": "Delete Output File", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If you have output=file then this option dictates whether or not the output file should be deleted when the Exchange is done processing. For example suppose the output file is a temporary file, then it ca [...]
     "failOnNullBody": { "index": 4, "kind": "parameter", "displayName": "Fail On Null Body", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not to throw an exception if the input body is null." },
     "output": { "index": 5, "kind": "parameter", "displayName": "Output", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xslt.XsltOutput", "enum": [ "string", "bytes", "DOM", "file" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "string", "description": "Option to specify which output type to use. Possible values are: string, bytes, DOM, file. The first three options are all in memory based, whe [...]
diff --git a/components/camel-xslt/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java b/components/camel-xslt/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
index 98c8e81cc22..28f14f1077e 100644
--- a/components/camel-xslt/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
+++ b/components/camel-xslt/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
@@ -270,15 +270,15 @@ public class XsltEndpoint extends ProcessorEndpoint {
         this.errorListener = errorListener;
     }
 
-    @ManagedAttribute(description = "Cache for the resource content (the stylesheet file) when it is loaded.")
+    @ManagedAttribute(description = "Cache for the resource content (the stylesheet file) when it is loaded on startup.")
     public boolean isContentCache() {
         return contentCache;
     }
 
     /**
-     * Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the
-     * stylesheet file on each message processing. This is good for development. A cached stylesheet can be forced to
-     * reload at runtime via JMX using the clearCachedStylesheet operation.
+     * Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to false Camel will
+     * reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be
+     * forced to reload at runtime via JMX using the clearCachedStylesheet operation.
      */
     public void setContentCache(boolean contentCache) {
         this.contentCache = contentCache;
@@ -381,16 +381,17 @@ public class XsltEndpoint extends ProcessorEndpoint {
 
         // must load resource first which sets a template and do a stylesheet compilation to catch errors early
         // load resource from classpath otherwise load in doStart()
-        if (ResourceHelper.isClasspathUri(resourceUri)) {
+        if (contentCache && ResourceHelper.isClasspathUri(resourceUri)) {
             loadResource(resourceUri, xslt);
         }
-        setProcessor(getXslt());
+        setProcessor(xslt);
     }
 
     @Override
     protected void doStart() throws Exception {
         super.doStart();
-        if (!ResourceHelper.isClasspathUri(resourceUri)) {
+
+        if (contentCache && !ResourceHelper.isClasspathUri(resourceUri)) {
             loadResource(resourceUri, xslt);
         }
     }
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java
index 7c4635248bd..c335d16c138 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java
@@ -121,10 +121,10 @@ public interface XJEndpointBuilderFactory {
         }
         /**
          * Cache for the resource content (the stylesheet file) when it is
-         * loaded. If set to false Camel will reload the stylesheet file on each
-         * message processing. This is good for development. A cached stylesheet
-         * can be forced to reload at runtime via JMX using the
-         * clearCachedStylesheet operation.
+         * loaded on startup. If set to false Camel will reload the stylesheet
+         * file on each message processing. This is good for development. A
+         * cached stylesheet can be forced to reload at runtime via JMX using
+         * the clearCachedStylesheet operation.
          * 
          * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
@@ -140,10 +140,10 @@ public interface XJEndpointBuilderFactory {
         }
         /**
          * Cache for the resource content (the stylesheet file) when it is
-         * loaded. If set to false Camel will reload the stylesheet file on each
-         * message processing. This is good for development. A cached stylesheet
-         * can be forced to reload at runtime via JMX using the
-         * clearCachedStylesheet operation.
+         * loaded on startup. If set to false Camel will reload the stylesheet
+         * file on each message processing. This is good for development. A
+         * cached stylesheet can be forced to reload at runtime via JMX using
+         * the clearCachedStylesheet operation.
          * 
          * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
          * type.
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XsltEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XsltEndpointBuilderFactory.java
index 49e3a5ebf13..30a150b418a 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XsltEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XsltEndpointBuilderFactory.java
@@ -84,10 +84,10 @@ public interface XsltEndpointBuilderFactory {
         }
         /**
          * Cache for the resource content (the stylesheet file) when it is
-         * loaded. If set to false Camel will reload the stylesheet file on each
-         * message processing. This is good for development. A cached stylesheet
-         * can be forced to reload at runtime via JMX using the
-         * clearCachedStylesheet operation.
+         * loaded on startup. If set to false Camel will reload the stylesheet
+         * file on each message processing. This is good for development. A
+         * cached stylesheet can be forced to reload at runtime via JMX using
+         * the clearCachedStylesheet operation.
          * 
          * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
@@ -103,10 +103,10 @@ public interface XsltEndpointBuilderFactory {
         }
         /**
          * Cache for the resource content (the stylesheet file) when it is
-         * loaded. If set to false Camel will reload the stylesheet file on each
-         * message processing. This is good for development. A cached stylesheet
-         * can be forced to reload at runtime via JMX using the
-         * clearCachedStylesheet operation.
+         * loaded on startup. If set to false Camel will reload the stylesheet
+         * file on each message processing. This is good for development. A
+         * cached stylesheet can be forced to reload at runtime via JMX using
+         * the clearCachedStylesheet operation.
          * 
          * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
          * type.
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XsltSaxonEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XsltSaxonEndpointBuilderFactory.java
index cfd6d70abeb..3bededbf9cd 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XsltSaxonEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XsltSaxonEndpointBuilderFactory.java
@@ -121,10 +121,10 @@ public interface XsltSaxonEndpointBuilderFactory {
         }
         /**
          * Cache for the resource content (the stylesheet file) when it is
-         * loaded. If set to false Camel will reload the stylesheet file on each
-         * message processing. This is good for development. A cached stylesheet
-         * can be forced to reload at runtime via JMX using the
-         * clearCachedStylesheet operation.
+         * loaded on startup. If set to false Camel will reload the stylesheet
+         * file on each message processing. This is good for development. A
+         * cached stylesheet can be forced to reload at runtime via JMX using
+         * the clearCachedStylesheet operation.
          * 
          * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
@@ -140,10 +140,10 @@ public interface XsltSaxonEndpointBuilderFactory {
         }
         /**
          * Cache for the resource content (the stylesheet file) when it is
-         * loaded. If set to false Camel will reload the stylesheet file on each
-         * message processing. This is good for development. A cached stylesheet
-         * can be forced to reload at runtime via JMX using the
-         * clearCachedStylesheet operation.
+         * loaded on startup. If set to false Camel will reload the stylesheet
+         * file on each message processing. This is good for development. A
+         * cached stylesheet can be forced to reload at runtime via JMX using
+         * the clearCachedStylesheet operation.
          * 
          * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
          * type.