This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
commit db6f198d9ed5280caf96d892e04647b312e9adb4 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sun Dec 3 17:44:50 2023 +0100 Add xslt example --- jbang/xslt-transform/README.adoc | 12 ++++++++++++ jbang/xslt-transform/sample.xml | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/jbang/xslt-transform/README.adoc b/jbang/xslt-transform/README.adoc index 78a12c5..b4b7df3 100644 --- a/jbang/xslt-transform/README.adoc +++ b/jbang/xslt-transform/README.adoc @@ -40,6 +40,18 @@ Or run with JBang using the longer command line (without installing camel as app $ jbang camel@apache/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 diff --git a/jbang/xslt-transform/sample.xml b/jbang/xslt-transform/sample.xml new file mode 100644 index 0000000..4b3dc7e --- /dev/null +++ b/jbang/xslt-transform/sample.xml @@ -0,0 +1,9 @@ +<hash> + <id type="integer">1369</id> + <uid>8c946e1a-fdc5-40d3-9098-44271bdfad65</uid> + <account-number>8673088731</account-number> + <iban>GB38EFUA27474531363797</iban> + <bank-name>ABN AMRO MEZZANINE (UK) LIMITED</bank-name> + <routing-number>053228004</routing-number> + <swift-bic>AACCGB21</swift-bic> +</hash> \ No newline at end of file