Xalan-C++ API Documentation

The Xalan C++ XSL Transformer Version 1.1

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XalanTransformer Class Reference

This is a simple C++ interface for some common usage patterns. More...

#include <XalanTransformer.hpp>

Collaboration diagram for XalanTransformer:

Collaboration graph

[legend]
List of all members.

Public Methods

Static Public Methods


Detailed Description

This is a simple C++ interface for some common usage patterns.

It's the user's responsibility to call initialize and terminate before creating and after deleting any XalanTransformer instances respectively.


Constructor & Destructor Documentation

XalanTransformer::XalanTransformer ( )
 

virtual XalanTransformer::~XalanTransformer ( ) [virtual]
 


Member Function Documentation

const char * XalanTransformer::getLastError ( ) const
 

Returns the last error that occurred as a result of calling transform.

Returns:
error message const character pointer.

void XalanTransformer::initialize ( ) [static]
 

Initialize Xalan.

Should be called only once per process before creating any instances of XalanTransformer. See class XSLTInit.

void XalanTransformer::terminate ( ) [static]
 

Terminate Xalan.

Should be called only once per process after deleting all instances of XalanTransformer. See class XSLTInit.

int XalanTransformer::transform ( const char * theXMLFileName,
const char * theXSLFileName,
const void * theOutputHandle,
XalanOutputHandlerType theOutputHandler,
XalanFlushHandlerType theFlushHandler = 0 )
 

Transform the XML source tree to a callback function.

The processor will apply the stylesheet file to the input file and allocate the transformation result to a callback function in pre-allocated blocks. Upon termination, Xalan releases any allocated memory. Data passed to the callback is not guaranteed to be null terminated.

Parameters:
theXMLFileName   filename of XML input source
theXSLFileName   filename of stylesheet source
theOutputHandle   void pointer passed through to callback.
theOutputHandler   a user defined (callback) function.
theFlushHandler   (optional) a user defined (callback) function.
Returns:
0 for success

int XalanTransformer::transform ( istream & theXMLInStream,
ostream & theOutStream )
 

Transform the XML source tree to an output stream.

The processor will apply the the stylesheet provided as a PI in the XML of the input stream and write the transformation output to the output stream.

Parameters:
theXMLInStream   a std istream for the input
theOutStream   a std ostream for the output
Returns:
0 for success

int XalanTransformer::transform ( istream & theXMLInStream,
istream & theXSLInStream,
ostream & theOutStream )
 

Transform the XML source tree to an output stream.

The processor will apply the the stylesheet stream to the input stream and write the transformation output to the output stream.

Parameters:
theXMLInStream   a std istream for the input
theXSLInStream   a std istream for the input
theOutStream   a std ostream for the output
Returns:
0 for success

int XalanTransformer::transform ( const char * theXMLFileName,
ostream & theOutStream )
 

Transform the XML source tree to an output stream.

The processor will apply the the stylesheet provided as a PI in the the XML to the input file and write the transformation output to the output stream.

Parameters:
theXMLFileName   filename of XML input source
theXSLFileName   filename of stylesheet source
theOutStream   a std ostream for the output
Returns:
0 for success

int XalanTransformer::transform ( const char * theXMLFileName,
const char * theXSLFileName,
ostream & theOutStream )
 

Transform the XML source tree to an output stream.

The processor will apply the the stylesheet file to the input file and write the transformation output to the output stream.

Parameters:
theXMLFileName   filename of XML input source
theXSLFileName   filename of stylesheet source
theOutStream   a std ostream for the output
Returns:
0 for success

int XalanTransformer::transform ( const char * theXMLFileName,
const char * theOutFileName )
 

Transform the XML source tree to the given result file.

The processor will apply the the stylesheet provided as a PI in the the XML to the input file and write the transformation output to the output file.

Parameters:
theXMLFileName   filename of XML input file
theOutFileName   filename of output file
Returns:
0 for success

int XalanTransformer::transform ( const char * theXMLFileName,
const char * theXSLFileName,
const char * theOutFileName )
 

Transform the XML source tree to the given result file.

The processor will apply the the stylesheet source to the input source and write the transformation output to the output file.

Parameters:
theXMLFileName   filename of XML input file
theXSLFileName   filename of stylesheet file
theOutFileName   filename of output file
Returns:
0 for success

int XalanTransformer::transform ( const XSLTInputSource & inputSource,
const XSLTInputSource & stylesheetSource,
XSLTResultTarget & outputTarget )
 

Transform the source tree to output in the given result tree target.

The processor will apply the the stylesheet source to the input source and write the transformation output to the target. Called internally by all transform methods.

Parameters:
inputSource   input source
stylesheetSource   stylesheet source
outputTarget   output source tree
Returns:
0 for success


The documentation for this class was generated from the following file:

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSL Transformer Version 1.1
Copyright © 2000, 2001 The Apache Software Foundation. All Rights Reserved.