Xalan-C++ API Documentation
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:
[legend]List of all members.Public Types
Public Methods
- XalanTransformer ()
- virtual ~XalanTransformer ()
- int transform ( const XalanParsedSource& theParsedXML, const XSLTInputSource& theStylesheetSource, const XSLTResultTarget& theResultTarget)
- Transform will apply the stylesheet source to the parsed xml source and write the transformation output to the target. More...
- int transform ( const XalanParsedSource& theParsedXML, const XalanCompiledStylesheet* theCompiledStylesheet, const XSLTResultTarget& theResultTarget)
- Transform will apply the compiled stylesheet to the parsed xml source and write the transformation output to the target. More...
- int transform ( const XSLTInputSource& theInputSource, const XSLTInputSource& theStylesheetSource, const XSLTResultTarget& theResultTarget)
- Transform will apply the stylesheet source to the input source and write the transformation output to the target. More...
- int transform ( const XSLTInputSource& theInputSource, const XSLTResultTarget& theResultTarget)
- Transform will apply the stylesheet provided as a PI in the XML of the input source and write the transformation output to the target. More...
- int transform ( const XSLTInputSource& theInputSource, const XSLTInputSource& theStylesheetSource, void* theOutputHandle, XalanOutputHandlerType theOutputHandler, XalanFlushHandlerType theFlushHandler = 0)
- Transform will apply the stylesheet source to the input source and write the transformation result to a callback function in pre-allocated blocks. More...
- int transform ( const XSLTInputSource& theInputSource, const XalanCompiledStylesheet* theCompiledStylesheet, const XSLTResultTarget& theResultTarget)
- Transform will apply the compiled stylesheet to the input source and write the transformation output to the target. More...
- int transform ( const XalanParsedSource& theParsedSource, const XalanCompiledStylesheet* theCompiledStylesheet, void* theOutputHandle, XalanOutputHandlerType theOutputHandler, XalanFlushHandlerType theFlushHandler = 0)
- Transform will apply the compiled stylesheet to the source and write the transformation result to a callback function in pre-allocated blocks. More...
- int transform ( const XSLTInputSource& theInputSource, void* theOutputHandle, XalanOutputHandlerType theOutputHandler, XalanFlushHandlerType theFlushHandler = 0)
- Transform will apply the stylesheet provided as a PI in the XML of the input source and write the transformation result to a callback function in pre-allocated blocks. More...
- int compileStylesheet ( const XSLTInputSource& theStylesheetSource, const XalanCompiledStylesheet*& theCompiledStylesheet)
- Creates a compeled stylesheet. More...
- int destroyStylesheet (const XalanCompiledStylesheet* theStylesheet)
- Destroy a XalanCompiledStylesheet instance created by a previous call to compileStylesheet(). More...
- int parseSource ( const XSLTInputSource& theInputSource, const XalanParsedSource*& theParsedSource, bool useXercesDOM = false)
- Parse a source XML document. More...
- int destroyParsedSource (const XalanParsedSource* theParsedSource)
- Destroy a parsed source created by a previous call to parseSource(). More...
- XalanDocumentBuilder* createDocumentBuilder ()
- Create a document builder. More...
- void destroyDocumentBuilder (XalanDocumentBuilder* theDocumentBuilder)
- Destroy a document builder created by a previous call to createDocumentBuilder(). More...
- void installExternalFunction ( const XalanDOMString& theNamespace, const XalanDOMString& functionName, const Function& function)
- Install an external function in the local space. More...
- void uninstallExternalFunction ( const XalanDOMString& theNamespace, const XalanDOMString& functionName)
- Uninstall an external local function. More...
- void setStylesheetParam ( const XalanDOMString& key, const XalanDOMString& expression)
- Set a top-level stylesheet parameter. More...
- const char* getLastError () const
- Returns the last error that occurred as a result of calling transform. More...
Static Public Methods
Friends
Detailed Description
This is a simple C++ interface for some common usage patterns.
It's the user's responsibility to call initialize and terminate for Xerces and Xalan before creating and after deleting any XalanTransformer instances.
Member Typedef Documentation
typedef std::vector<FunctionPairType> XalanTransformer::FunctionParamPairVectorType
|
|
typedef std::vector<ParamPairType> XalanTransformer::ParamPairVectorType
|
|
typedef std::vector<const XalanParsedSource*> XalanTransformer::ParsedSourcePtrVectorType
|
|
Constructor & Destructor Documentation
XalanTransformer::XalanTransformer (
|
)
|
|
virtual XalanTransformer::~XalanTransformer (
|
) [virtual]
|
|
Member Function Documentation
|
Creates a compeled stylesheet.
The input source can be a file name, a stream or a root node. The XalanTransformer instance owns the XalanCompiledStylesheet instance and will delete it when the XalanTransformer instance goes out of scope, or you explicitly call destroyStylesheet(). You must not delete the instance yourself. -
Parameters:
-
theStylesheetSource
|
input source |
theCompiledStylesheet
|
a reference to a pointer to a XalanCompileStylesheet. |
-
Returns:
-
0 for success
|
|
Create a document builder.
Using the document builder, you can construct a document using SAX2 interfaces. The XalanTransformer instance owns the document builder and will delete it when the XalanTransformer instance goes out of scope, or you explicitly call deleteDocumentBuilder(). You must not delete the instance yourself.
-
Returns:
-
a pointer to a XalanDocumentBuilder instance or 0 for failure.
|
|
Destroy a document builder created by a previous call to createDocumentBuilder().
Passing a pointer that is not created by a call to createDocumentBuilder() can result in undefined behavior. -
Parameters:
-
theDocumentBuilder
|
The document builder to destroy. |
|
int XalanTransformer::destroyParsedSource (
|
const XalanParsedSource * theParsedSource )
|
|
|
Destroy a parsed source created by a previous call to parseSource().
-
Parameters:
-
-
Returns:
-
0 for success
|
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. |
|
Install an external function in the local space.
-
Parameters:
-
theNamespace
|
The namespace for the functionl |
functionName
|
The name of the function. |
function
|
The function to install. |
|
|
Install an external function in the global space.
-
Parameters:
-
theNamespace
|
The namespace for the functionl |
functionName
|
The name of the function. |
function
|
The function to install. |
|
|
Parse a source XML document.
The input source can be a file name, a stream or a root node. The XalanTransformer instance owns the XalanParsedSource instance and will delete it when the XalanTransformer instance goes out of scope, or you explicitly call destroyParsedSource(). You must not delete the instance yourself. -
Parameters:
-
theInputSource
|
input source |
theParsedSource
|
a reference to a pointer to a XalanParsedSource. |
useXercesDOM
|
input use default or xerces dom source tree |
-
Returns:
-
0 for success
|
|
Set a top-level stylesheet parameter.
This value can be evaluated via xsl:param-variable. -
Parameters:
-
key
|
name of the param |
expression
|
expression that will be evaluated |
|
void XalanTransformer::terminate (
|
) [static]
|
|
|
Terminate Xalan.
Should be called only once per process after deleting all instances of XalanTransformer. See class XSLTInit. |
|
Transform will apply the stylesheet provided as a PI in the XML of the input source and write the transformation result to a callback function in pre-allocated blocks.
The input source can be a file name, a stream or a root node. Upon termination, Xalan releases any allocated memory. Data passed to the callback is not guaranteed to be null terminated.
-
Parameters:
-
theInputSource
|
input source |
theOutputHandle
|
void pointer passed through to callback. |
theOutputHandler
|
a user defined callback function. |
theFlushHandler
|
an optional user-defined callback function. |
-
Returns:
-
0 for success
|
|
Transform will apply the compiled stylesheet to the source and write the transformation result to a callback function in pre-allocated blocks.
The input source can be a file name, a stream or a root node. Upon termination, Xalan releases any allocated memory. Data passed to the callback is not guaranteed to be null terminated.
-
Parameters:
-
theParsedSource
|
Parsed source instance |
theCompiledStylesheet
|
pointer to a compiled stylesheet |
theOutputHandle
|
void pointer passed through to callback. |
theOutputHandler
|
a user defined callback function. |
theFlushHandler
|
An optional user-defined callback function. |
-
Returns:
-
0 for success
|
|
Transform will apply the compiled stylesheet to the input source and write the transformation output to the target.
The input source and result target can be a file name, a stream or a root node. -
Parameters:
-
theInputSource
|
input source |
theCompiledStylesheet
|
pointer to a compiled stylesheet |
theResultTarget
|
output source |
-
Returns:
-
0 for success
|
|
Transform will apply the stylesheet source to the input source and write the transformation result to a callback function in pre-allocated blocks.
The input source can be a file name, a stream or a root node. Upon termination, Xalan releases any allocated memory. Data passed to the callback is not guaranteed to be null terminated.
-
Parameters:
-
theInputSource
|
input source |
theStylesheetSource
|
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
|
|
Transform will apply the stylesheet provided as a PI in the XML of the input source and write the transformation output to the target.
The input source and result target can be a file name, a stream or a root node. -
Parameters:
-
theInputSource
|
input source |
theResultTarget
|
output source tree |
-
Returns:
-
0 for success
|
|
Transform will apply the stylesheet source to the input source and write the transformation output to the target.
The input source and result target can be a file name, a stream or a root node. -
Parameters:
-
theInputSource
|
input source |
theStylesheetSource
|
stylesheet source |
theResultTarget
|
output source |
-
Returns:
-
0 for success
|
|
Transform will apply the compiled stylesheet to the parsed xml source and write the transformation output to the target.
-
Parameters:
-
theParsedXML
|
the parsed input source |
theCompiledStylesheet
|
pointer to a compiled stylesheet |
theResultTarget
|
output source |
-
Returns:
-
0 for success
|
|
Transform will apply the stylesheet source to the parsed xml source and write the transformation output to the target.
-
Parameters:
-
theParsedXML
|
the parsed input source |
theStylesheetSource
|
stylesheet source |
theResultTarget
|
output source |
-
Returns:
-
0 for success
|
|
Uninstall an external local function.
-
Parameters:
-
theNamespace
|
The namespace for the function |
functionName
|
The name of the function. |
|
void XalanTransformer::uninstallExternalFunctionGlobal (
|
const XalanDOMString & theNamespace,
|
|
const XalanDOMString & functionName ) [static]
|
|
|
Uninstall an external global function.
-
Parameters:
-
theNamespace
|
The namespace for the function |
functionName
|
The name of the function. |
|
Friends And Related Function Documentation
class EnsureReset [friend]
|
|
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.
|
|