The example executes an XSL transform on a source XML document which generates a new result. This example has a number of prerequisites:
- Define an XML document structure – defines your input XML document.
- Writing an XSLT Transform – defines the rules to transform the input XML document into a output document.
- Opening/Loading an XML document – This is required to load the source XML document and the XSL Transform document.
The Java example uses the Source and Result interface to designate the inputs and outputs. The actual Source/Result definitions are implementation dependent.
As a side note: the transformer factory to use is dependent on your implementation. If no transformer factory is specified then the newInstance() method returns the default transformer factory for the JVM/platform.
The C# XSLT example illustrates 3 concepts:
- Parse and load XML document from a string source into memory. This is done for both the source document and the transform document
- Apply an XSL transform to the source document – generating a result
- Write the result to a writer (or if required a stream). This happens at the same time as the transform.
No example – YET…
This is an ongoing project – Be sure to follow our site as we are constantly adding new content just for you! If you have a special request, contact us and let us know!