Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

Public Types | Public Member Functions
XSLTProcessor Class Reference

This is an interface for an XSLT Processor engine. More...

Inheritance diagram for XSLTProcessor:
XSLTEngineImpl

List of all members.

Public Types

Public Member Functions


Detailed Description

This is an interface for an XSLT Processor engine.

It's the responsibility of the implementation of the XSLTProcessor interface, collaborating with a XMLParserLiaison, the DOM, and the XPath engine, to transform a source tree of nodes into a result tree according to instructions and templates specified by a stylesheet tree. The methods process(...) are the primary public entry points.

If you reuse the processor instance, you should call reset() between calls.


Member Typedef Documentation

typedef size_t XSLTProcessor::size_type

Constructor & Destructor Documentation

XSLTProcessor::XSLTProcessor ( )
virtual XSLTProcessor::~XSLTProcessor ( ) [virtual]

Member Function Documentation

virtual void XSLTProcessor::addTraceListener ( TraceListener tl) [pure virtual]

Add a trace listener for the purposes of debugging and diagnosis.

Parameters:
tlpointer to listener to add

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::error ( const XalanDOMString msg,
const LocatorType locator,
const XalanNode sourceNode = 0 
) const [pure virtual]

Report an error and throw an exception.

Parameters:
msgtext of message to output
locatorA LocatorType for error reporting
sourceNodenode in source where error occurred

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::error ( const XalanDOMString msg,
const XalanNode sourceNode = 0,
const ElemTemplateElement styleNode = 0 
) const [pure virtual]

Report an error and throw an exception.

Parameters:
msgtext of message to output
sourceNodenode in source where error occurred
styleNodenode in stylesheet where error occurred

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::fireGenerateEvent ( const GenerateEvent ge) [pure virtual]

Fire a generate event.

Parameters:
gegenerate event to fire

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::fireSelectEvent ( const SelectionEvent se) [pure virtual]

Fire a selection event.

Parameters:
seselection event to fire

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::fireTraceEvent ( const TracerEvent te) [pure virtual]

Fire a trace event.

Parameters:
tetrace event to fire

Implemented in XSLTEngineImpl.

virtual FormatterListener* XSLTProcessor::getFormatterListener ( ) const [pure virtual]

Get the current formatter listener.

Returns:
pointer to formatter listener

Implemented in XSLTEngineImpl.

virtual XalanNode* XSLTProcessor::getSourceTreeFromInput ( const XSLTInputSource inputSource) [pure virtual]

Given an input source, get the source tree.

Parameters:
inputSourcepointer to input source
Returns:
source tree

Implemented in XSLTEngineImpl.

virtual const StylesheetRoot* XSLTProcessor::getStylesheetRoot ( ) const [pure virtual]

Retrieve the root stylesheet.

Returns:
pointer to root stylesheet

Implemented in XSLTEngineImpl.

virtual size_type XSLTProcessor::getTraceListeners ( ) const [pure virtual]

Determine the number of trace listeners.

Returns:
number of listeners

Implemented in XSLTEngineImpl.

virtual bool XSLTProcessor::getTraceSelects ( ) const [pure virtual]

If this is set to true, simple traces of template calls are made.

Returns:
true if traces made

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::getUniqueNamespaceValue ( XalanDOMString theValue) [pure virtual]

Generate a random namespace prefix guaranteed to be unique.

Parameters:
theValueA string for returning the new prefix

Implemented in XSLTEngineImpl.

virtual XMLParserLiaison& XSLTProcessor::getXMLParserLiaison ( ) const [pure virtual]

Get the XML Parser Liaison that this processor uses.

Returns:
XML parser liaison object

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::message ( const XalanDOMString msg,
const XalanNode sourceNode = 0,
const ElemTemplateElement styleNode = 0 
) const [pure virtual]

Report a message.

Parameters:
msgtext of message to output
sourceNodenode in source where message occurred
styleNodenode in stylesheet where message occurred

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::message ( const XalanDOMString msg,
const LocatorType locator,
const XalanNode sourceNode = 0 
) const [pure virtual]

Report a message.

Parameters:
msgtext of message to output
locatorA LocatorType for error reporting
sourceNodenode in source where message occurred

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::process ( const XSLTInputSource inputSource,
XSLTResultTarget outputTarget,
StylesheetExecutionContext executionContext 
) [pure virtual]

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

This function does not create a stylesheet tree, it assumes the provided StylesheetExecutionContext has the stylesheet tree to use. This is set by calling StylesheetExecutionContext::setStylesheetRoot().

Parameters:
inputSourceinput source
outputTargetoutput source tree
executionContextcurrent execution context
Exceptions:
XSLProcessorException

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::process ( const XSLTInputSource inputSource,
const XSLTInputSource stylesheetSource,
XSLTResultTarget outputTarget,
StylesheetConstructionContext constructionContext,
StylesheetExecutionContext executionContext 
) [pure virtual]

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

The processor will process the input source, the stylesheet source, and transform to the output target.

Parameters:
inputSourceinput source
stylesheetSourcestylesheet source
outputTargetoutput source tree
constructionContextcontext for construction of objects
executionContextcurrent execution context
Exceptions:
XSLProcessorException

Implemented in XSLTEngineImpl.

virtual StylesheetRoot* XSLTProcessor::processStylesheet ( const XalanDOMString xsldocURLString,
StylesheetConstructionContext constructionContext 
) [pure virtual]

Given a URI to an XSL stylesheet, compile the stylesheet into an internal representation.

Parameters:
xmldocURLStringURI to the input XML document
constructionContextcontext for construction of objects
Returns:
pointer to compiled stylesheet object
Exceptions:
XSLProcessorException

Implemented in XSLTEngineImpl.

virtual StylesheetRoot* XSLTProcessor::processStylesheet ( const XSLTInputSource stylesheetSource,
StylesheetConstructionContext constructionContext 
) [pure virtual]

Given a stylesheet input source, compile the stylesheet into an internal representation.

Parameters:
stylesheetSourceinput source for the stylesheet
constructionContextcontext for construction of objects
Returns:
pointer to the compiled stylesheet object
Exceptions:
XSLProcessorException

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::removeTraceListener ( TraceListener tl) [pure virtual]

Remove a trace listener.

Parameters:
tlTrace listener to be removed.

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::reset ( ) [pure virtual]

Reset the state.

This needs to be called after a process() call is invoked, if the processor is to be used again.

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::resolveTopLevelParams ( StylesheetExecutionContext executionContext) [pure virtual]

Resolve the params that were pushed by the caller.

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::setDiagnosticsOutput ( PrintWriter pw) [pure virtual]

If this is set, diagnostics will be written to the m_diagnosticsPrintWriter stream.

If the value is null, then diagnostics will be turned off.

Parameters:
pwpointer to print writer

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::setExecutionContext ( StylesheetExecutionContext theExecutionContext) [pure virtual]

Set the execution context.

Must be set if after calling setStylesheetRoot.

Parameters:
theExecutionContextpointer to new execution context.

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::setFormatterListener ( FormatterListener flistener) [pure virtual]

Set the current formatter listener.

Parameters:
flistenerpointer to new formatter listener

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::setQuietConflictWarnings ( bool  b) [pure virtual]

If the quietConflictWarnings property is set to true, warnings about pattern conflicts won't be printed to the diagnostics stream.

True by default.

Parameters:
btrue if conflict warnings should be suppressed.

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::setStylesheetParam ( const XalanDOMString key,
const XalanDOMString expression 
) [pure virtual]

Push a top-level stylesheet parameter.

This value can be evaluated via xsl:param-variable.

Parameters:
keyname of the param
expressionexpression that will be evaluated

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::setStylesheetParam ( const XalanDOMString key,
XObjectPtr  value 
) [pure virtual]

Push a top-level stylesheet parameter.

This value can be evaluated via xsl:param-variable.

Parameters:
keyname of the parameter
valueXObject value for parameter

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::setStylesheetRoot ( const StylesheetRoot theStylesheet) [pure virtual]

Set the root stylesheet.

Parameters:
theStylesheetpointer to new root stylesheet

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::traceSelect ( StylesheetExecutionContext executionContext,
const ElemTemplateElement theStylesheetElement,
const NodeRefListBase nl,
const XPath xpath 
) const [pure virtual]

Compose a diagnostic trace of the current selection.

Parameters:
executionContextThe current execution context
theStylesheetElementThe executing stylesheet element
nlThe list of selected nodes
xpathA pointer to the XPath which generated the list of nodes, if any.

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::warn ( const XalanDOMString msg,
const XalanNode sourceNode = 0,
const ElemTemplateElement styleNode = 0 
) const [pure virtual]

Report a warning.

Parameters:
msgtext of message to output
sourceNodenode in source where warning occurred
styleNodenode in stylesheet where warning occurred

Implemented in XSLTEngineImpl.

virtual void XSLTProcessor::warn ( const XalanDOMString msg,
const LocatorType locator,
const XalanNode sourceNode = 0 
) const [pure virtual]

Report a warning.

Parameters:
msgtext of message to output
locatorA LocatorType for error reporting
sourceNodenode in source where error occurred

Implemented in XSLTEngineImpl.


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.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo