DeltaXML.com - Change Control For XML, In XML.(spacer) Home    About Us    Contact Us    Search
(spacer)

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

README.txt

This file as ASCII

build.xml

Ant script for compilation, running, tidyup

OutputControl.java

Pipeline source code

in.xml

Example input data

stage1.xsl

Stage 1 XSLT source

stage2.xsl

Stage 2 XSLT source

 (spacer)Copyright © 2000-2005 DeltaXML Ltd, Malvern, UK. All rights reserved.
info@deltaxml.com