Output Control Example
Introduction
This code shows how the output of a pipeline can be controlled.
Various output properties associated with <xsl:output> are also
available programatically when the last stage of a pipeline
is a Transformer or TransformerHandler (but not an XMLFilter).
A 2 stage pipeline is used with the final stage
being a TransformerHandler.
The exmaple is rather artificial in that each stage of the pipeline
will add a paragraph (<p>) to the input data, but it does simply
demonstrate the application of the various stages.
Compile and Run
Please use the provided Ant script, or for Windows
Systems with J2SE 1.4.x, use the following commands:
Compile:
javac OututControl.java
Run:
java -cp ../saxon.jar;. OutputControl in.xml out-ident.xml yes
java -cp ../saxon.jar;. OutputControl in.xml out-noident.xml no
Manifest
|