blob: 0c30d8553f6a48ebddcfa6a4257d2b98be3b30a9 [file] [log] [blame]
== XSLT Transformation
This example shows a basic XML transformation using XSLT style sheet.
=== Install JBang
First install JBang according to https://www.jbang.dev
When JBang is installed then you should be able to run from a shell:
[source,sh]
----
$ jbang --version
----
This will output the version of JBang.
To run this example you can either install Camel on JBang via:
[source,sh]
----
$ jbang app install camel@apache/camel
----
Which allows to run CamelJBang with `camel` as shown below.
=== How to run
Then you can run this example using:
[source,sh]
----
$ camel run *
----
=== Live updates of message transformation
You can do live changes to the stylesheet and see the output in real-time with Camel JBang by running:
[source,bash]
----
$ camel transform message --body=file:sample.xml --component=xslt --template=file:mystyle.xsl --pretty --watch
----
You can then edit the `mystyle.xsl` file, and save the file, and watch the terminal for updated result.
=== Help and contributions
If you hit any problem using Camel or have some feedback, then please
https://camel.apache.org/community/support/[let us know].
We also love contributors, so
https://camel.apache.org/community/contributing/[get involved] :-)
The Camel riders!