Thursday, March 8, 2007

xslt

We can use jaxp to create an xml file.
The technique is :
1. Create one source xml file
2. Open an xslt file
3. the xslt would contain the code to process the xml file
4. call the transform method
5. result is new xml file
Advantages are :
You can just change the xslt and get different output xml
So there is no code change required.
Also if your source xml changes, then only xslt changes.. no code change.
This is in contrast with the JAXB where writing or marshalling the new xml means creating new xsd and generating the classes and using those classes to produce the required new xml.
Usage : in Workflow modeler

No comments: