To Build: "mvn clean install" To Run: "mvn exec:java"
Transforming using profiling
This is a simple example that illustrates how Smooks can be used to apply "profile" based transformations on a message.
Using profiles, you can share common transformation configurations across all messages that share the same profiles.
[work in progress]
So here's the source xml that is to be transformed:
And this is the expected result of the transform for target profile 'message-exchange-1':
In order to apply this transformer to a message fragment, a Smooks Configurationneeds to be created. This configuration will target the transformer at a particular message fragment. For more information on configuring XSLT resources, see XslContentDeliveryUnitCreator.
// Instantiate Smooks with the config...
Smooks smooks = new Smooks("smooks-config.xml");
// Filter the input message to the outputWriter, using the execution context...
smooks.filter(new StreamSource(messageIn), new StreamResult(outputWriter));
Of course, you'd typically cache the Smooks instance.