This is an interface for an XSLT Processor engine. More...
Public Types | |
typedef size_t | size_type |
Public Member Functions | |
XSLTProcessor () | |
virtual | ~XSLTProcessor () |
virtual void | process (const XSLTInputSource &inputSource, const XSLTInputSource &stylesheetSource, XSLTResultTarget &outputTarget, StylesheetConstructionContext &constructionContext, StylesheetExecutionContext &executionContext)=0 |
Transform the source tree to the output in the given result tree target. More... | |
virtual void | process (const XSLTInputSource &inputSource, XSLTResultTarget &outputTarget, StylesheetExecutionContext &executionContext)=0 |
Transform the source tree to the output in the given result tree target. More... | |
virtual StylesheetRoot * | processStylesheet (const XSLTInputSource &stylesheetSource, StylesheetConstructionContext &constructionContext)=0 |
Given a stylesheet input source, compile the stylesheet into an internal representation. More... | |
virtual StylesheetRoot * | processStylesheet (const XalanDOMString &xsldocURLString, StylesheetConstructionContext &constructionContext)=0 |
Given a URI to an XSL stylesheet, compile the stylesheet into an internal representation. More... | |
virtual void | reset ()=0 |
Reset the state. More... | |
virtual XalanNode * | getSourceTreeFromInput (const XSLTInputSource &inputSource)=0 |
Given an input source, get the source tree. More... | |
virtual const StylesheetRoot * | getStylesheetRoot () const =0 |
Retrieve the root stylesheet. More... | |
virtual void | setStylesheetRoot (const StylesheetRoot *theStylesheet)=0 |
Set the root stylesheet. More... | |
virtual void | setExecutionContext (StylesheetExecutionContext *theExecutionContext)=0 |
Set the execution context. More... | |
virtual void | resolveTopLevelParams (StylesheetExecutionContext &executionContext)=0 |
Resolve the params that were pushed by the caller. More... | |
virtual XMLParserLiaison & | getXMLParserLiaison () const =0 |
Get the XML Parser Liaison that this processor uses. More... | |
virtual void | getUniqueNamespaceValue (XalanDOMString &theValue)=0 |
Generate a random namespace prefix guaranteed to be unique. More... | |
virtual void | setStylesheetParam (const XalanDOMString &key, XObjectPtr value)=0 |
Push a top-level stylesheet parameter. More... | |
virtual void | setStylesheetParam (const XalanDOMString &key, const XalanDOMString &expression)=0 |
Push a top-level stylesheet parameter. More... | |
virtual FormatterListener * | getFormatterListener () const =0 |
Get the current formatter listener. More... | |
virtual void | setFormatterListener (FormatterListener *flistener)=0 |
Set the current formatter listener. More... | |
virtual size_type | getTraceListeners () const =0 |
Determine the number of trace listeners. More... | |
virtual void | addTraceListener (TraceListener *tl)=0 |
Add a trace listener for the purposes of debugging and diagnosis. More... | |
virtual void | removeTraceListener (TraceListener *tl)=0 |
Remove a trace listener. More... | |
virtual void | fireGenerateEvent (const GenerateEvent &ge)=0 |
Fire a generate event. More... | |
virtual void | fireTraceEvent (const TracerEvent &te)=0 |
Fire a trace event. More... | |
virtual void | fireSelectEvent (const SelectionEvent &se)=0 |
Fire a selection event. More... | |
virtual bool | getTraceSelects () const =0 |
If this is set to true, simple traces of template calls are made. More... | |
virtual void | traceSelect (StylesheetExecutionContext &executionContext, const ElemTemplateElement &theStylesheetElement, const NodeRefListBase &nl, const XPath *xpath) const =0 |
Compose a diagnostic trace of the current selection. More... | |
virtual void | setQuietConflictWarnings (bool b)=0 |
If the quietConflictWarnings property is set to true, warnings about pattern conflicts won't be printed to the diagnostics stream. More... | |
virtual void | setDiagnosticsOutput (PrintWriter *pw)=0 |
If this is set, diagnostics will be written to the m_diagnosticsPrintWriter stream. More... | |
virtual void | message (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const =0 |
Report a message. More... | |
virtual void | message (const XalanDOMString &msg, const LocatorType &locator, const XalanNode *sourceNode=0) const =0 |
Report a message. More... | |
virtual void | warn (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const =0 |
Report a warning. More... | |
virtual void | warn (const XalanDOMString &msg, const LocatorType &locator, const XalanNode *sourceNode=0) const =0 |
Report a warning. More... | |
virtual void | error (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const =0 |
Report an error and throw an exception. More... | |
virtual void | error (const XalanDOMString &msg, const LocatorType &locator, const XalanNode *sourceNode=0) const =0 |
Report an error and throw an exception. More... | |
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.
typedef size_t XSLTProcessor::size_type |
XSLTProcessor::XSLTProcessor | ( | ) |
|
virtual |
|
pure virtual |
Add a trace listener for the purposes of debugging and diagnosis.
tl | pointer to listener to add |
Implemented in XSLTEngineImpl.
|
pure virtual |
Report an error and throw an exception.
msg | text of message to output |
sourceNode | node in source where error occurred |
styleNode | node in stylesheet where error occurred |
Implemented in XSLTEngineImpl.
|
pure virtual |
Report an error and throw an exception.
msg | text of message to output |
locator | A LocatorType for error reporting |
sourceNode | node in source where error occurred |
Implemented in XSLTEngineImpl.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Get the current formatter listener.
Implemented in XSLTEngineImpl.
|
pure virtual |
Given an input source, get the source tree.
inputSource | pointer to input source |
Implemented in XSLTEngineImpl.
|
pure virtual |
|
pure virtual |
|
pure virtual |
If this is set to true, simple traces of template calls are made.
Implemented in XSLTEngineImpl.
|
pure virtual |
Generate a random namespace prefix guaranteed to be unique.
theValue | A string for returning the new prefix |
Implemented in XSLTEngineImpl.
|
pure virtual |
Get the XML Parser Liaison that this processor uses.
Implemented in XSLTEngineImpl.
|
pure virtual |
Report a message.
msg | text of message to output |
sourceNode | node in source where message occurred |
styleNode | node in stylesheet where message occurred |
Implemented in XSLTEngineImpl.
|
pure virtual |
Report a message.
msg | text of message to output |
locator | A LocatorType for error reporting |
sourceNode | node in source where message occurred |
Implemented in XSLTEngineImpl.
|
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.
inputSource | input source |
stylesheetSource | stylesheet source |
outputTarget | output source tree |
constructionContext | context for construction of objects |
executionContext | current execution context |
XSLProcessorException |
Implemented in XSLTEngineImpl.
|
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().
inputSource | input source |
outputTarget | output source tree |
executionContext | current execution context |
XSLProcessorException |
Implemented in XSLTEngineImpl.
|
pure virtual |
Given a stylesheet input source, compile the stylesheet into an internal representation.
stylesheetSource | input source for the stylesheet |
constructionContext | context for construction of objects |
XSLProcessorException |
Implemented in XSLTEngineImpl.
|
pure virtual |
Given a URI to an XSL stylesheet, compile the stylesheet into an internal representation.
xmldocURLString | URI to the input XML document |
constructionContext | context for construction of objects |
XSLProcessorException |
Implemented in XSLTEngineImpl.
|
pure virtual |
|
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.
|
pure virtual |
Resolve the params that were pushed by the caller.
Implemented in XSLTEngineImpl.
|
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.
pw | pointer to print writer |
Implemented in XSLTEngineImpl.
|
pure virtual |
Set the execution context.
Must be set if after calling setStylesheetRoot.
theExecutionContext | pointer to new execution context. |
Implemented in XSLTEngineImpl.
|
pure virtual |
Set the current formatter listener.
flistener | pointer to new formatter listener |
Implemented in XSLTEngineImpl.
|
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.
b | true if conflict warnings should be suppressed. |
Implemented in XSLTEngineImpl.
|
pure virtual |
Push a top-level stylesheet parameter.
This value can be evaluated via xsl:param-variable.
key | name of the parameter |
value | XObject value for parameter |
Implemented in XSLTEngineImpl.
|
pure virtual |
Push a top-level stylesheet parameter.
This value can be evaluated via xsl:param-variable.
key | name of the param |
expression | expression that will be evaluated |
Implemented in XSLTEngineImpl.
|
pure virtual |
Set the root stylesheet.
theStylesheet | pointer to new root stylesheet |
Implemented in XSLTEngineImpl.
|
pure virtual |
Compose a diagnostic trace of the current selection.
executionContext | The current execution context |
theStylesheetElement | The executing stylesheet element |
nl | The list of selected nodes |
xpath | A pointer to the XPath which generated the list of nodes, if any. |
Implemented in XSLTEngineImpl.
|
pure virtual |
Report a warning.
msg | text of message to output |
sourceNode | node in source where warning occurred |
styleNode | node in stylesheet where warning occurred |
Implemented in XSLTEngineImpl.
|
pure virtual |
Report a warning.
msg | text of message to output |
locator | A LocatorType for error reporting |
sourceNode | node in source where error occurred |
Implemented in XSLTEngineImpl.
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
![]() |
Xalan-C++ XSLT Processor Version 1.10 |
|