Qizx fe-4.4p2 API

com.qizx.api.util
Class PushStreamResult

java.lang.Object
  extended by javax.xml.transform.sax.SAXResult
      extended by com.qizx.api.util.PushStreamResult
All Implemented Interfaces:
Result

public class PushStreamResult
extends SAXResult

An extension of SAXResult that adapts to XMLPushStream.

Can be used to store the result of a XSLT transformation into a Document of an XML Library.

To perform this operation, use Library.beginImportDocument(String), and wrap the returned handler in a PushStreamResult, which is then used as output by the XSLT transformation. After the XSLT transformation, it is compulsory to call endImportDocument:

 Library lib = ...; // a XML Library where the result is stored
 javax.xml.transform.Transformer transformer = ... ; // XSLT processor
 javax.xml.transform.Source source = ...; // source to be transformed
 
 PushStreamResult result = new PushStreamResult(lib.beginImportDocument());
 transformer.transform(source, result);
 Document doc = lib.endImportDocument();
 //... doc can be used to set Properties
 


Field Summary
 
Fields inherited from class javax.xml.transform.sax.SAXResult
FEATURE
 
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
 
Constructor Summary
PushStreamResult(XMLPushStream output)
          Builds a SAXResult that writes to a XMLPushStream.
 
Method Summary
 
Methods inherited from class javax.xml.transform.sax.SAXResult
getHandler, getLexicalHandler, getSystemId, setHandler, setLexicalHandler, setSystemId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushStreamResult

public PushStreamResult(XMLPushStream output)
Builds a SAXResult that writes to a XMLPushStream.

Parameters:
output - the XMLPushStream output

© 2010 Axyana Software