Xalan-C++ API Reference
1.12.0
|
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison, 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. More...
#include <xalanc/XSLT/XSLTEngineImpl.hpp>
Classes | |
struct | FindStringPointerFunctor |
struct | LessXalanDOMStringPointers |
Public Member Functions | |
XSLTEngineImpl (MemoryManager &theManager, XMLParserLiaison &parserLiaison, XPathEnvSupport &xpathEnvSupport, DOMSupport &domSupport, XObjectFactory &xobjectFactory, XPathFactory &xpathFactory) | |
Construct an XSL processor that can call back to a XML processor, so it can handle included files, and the like. More... | |
virtual | ~XSLTEngineImpl () |
MemoryManager & | getMemoryManager () const |
MemoryManager & | getMemoryManager () |
virtual void | problem (eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode) |
Function that is called when a problem event occurs. More... | |
virtual void | problem (eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode) |
Function that is called when a problem event occurs. More... | |
virtual void | process (const XSLTInputSource &inputSource, const XSLTInputSource &stylesheetSource, XSLTResultTarget &outputTarget, StylesheetConstructionContext &constructionContext, StylesheetExecutionContext &executionContext) |
Transform the source tree to the output in the given result tree target. More... | |
virtual void | process (const XSLTInputSource &inputSource, XSLTResultTarget &outputTarget, StylesheetExecutionContext &executionContext) |
Transform the source tree to the output in the given result tree target. More... | |
virtual StylesheetRoot * | processStylesheet (const XSLTInputSource &stylesheetSource, StylesheetConstructionContext &constructionContext) |
Given a stylesheet input source, compile the stylesheet into an internal representation. More... | |
virtual StylesheetRoot * | processStylesheet (const XalanDOMString &xsldocURLString, StylesheetConstructionContext &constructionContext) |
Given a URI to an XSL stylesheet, compile the stylesheet into an internal representation. More... | |
virtual XalanNode * | getSourceTreeFromInput (const XSLTInputSource &inputSource) |
Given an input source, get the source tree. More... | |
virtual void | resolveTopLevelParams (StylesheetExecutionContext &executionContext) |
Resolve the params that were pushed by the caller. More... | |
virtual XMLParserLiaison & | getXMLParserLiaison () const |
Get the XML Parser Liaison that this processor uses. More... | |
virtual void | getUniqueNamespaceValue (XalanDOMString &theValue) |
Generate a random namespace prefix guaranteed to be unique. More... | |
virtual void | setStylesheetParam (const XalanDOMString &key, const XalanDOMString &expression) |
Set a top-level parameter, which the stylesheet can access with a top-level xsl:param. More... | |
virtual void | setStylesheetParam (const XalanDOMString &key, XObjectPtr value) |
Set a top-level parameter, which the stylesheet can access with a top-level xsl:param. More... | |
virtual void | clearStylesheetParams () |
Clear any stylesheet params. More... | |
virtual FormatterListener * | getFormatterListener () const |
Get the current formatter listener. More... | |
virtual void | setFormatterListener (FormatterListener *flistener) |
Set the current formatter listener. More... | |
virtual size_type | getTraceListeners () const |
Determine the number of trace listeners. More... | |
virtual void | addTraceListener (TraceListener *tl) |
Add a trace listener for the purposes of debugging and diagnosis. More... | |
virtual void | removeTraceListener (TraceListener *tl) |
Remove a trace listener. More... | |
virtual void | fireGenerateEvent (const GenerateEvent &ge) |
Fire a generate event. More... | |
virtual void | fireTraceEvent (const TracerEvent &te) |
Fire a trace event. More... | |
virtual void | fireSelectEvent (const SelectionEvent &se) |
Fire a selection event. More... | |
virtual bool | getTraceSelects () const |
If this is set to true, simple traces of template calls are made. More... | |
virtual void | setTraceSelects (bool b) |
void | traceSelect (StylesheetExecutionContext &executionContext, const ElemTemplateElement &theTemplate, const NodeRefListBase &nl, const XPath *xpath) const |
Compose a diagnostic trace of the current selection. More... | |
virtual void | setQuietConflictWarnings (bool b) |
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) |
If this is set, diagnostics will be written to the m_diagnosticsPrintWriter stream. More... | |
virtual const XalanDOMString * | getNamespaceForPrefix (const XalanDOMString &prefix) const |
Retrieve a namespace corresponding to a prefix. More... | |
virtual const XalanDOMString & | getURI () const |
Retrieve the base URI for the resolver. More... | |
XalanDocument * | parseXML (const XalanDOMString &urlString, DocumentHandler *docHandler, XalanDocument *docToRegister, ErrorHandler *theErrorHandler=0) |
Read in the XML file, either producing a Document or calling SAX events, and register the document in a table. More... | |
XalanDocument * | parseXML (const InputSource &inputSource, DocumentHandler *docHandler, XalanDocument *docToRegister, ErrorHandler *theErrorHandler=0) |
Read in the XML file, either producing a Document or calling SAX events, and register the document in a table. More... | |
Stylesheet * | getStylesheetFromPIURL (const XalanDOMString &xslURLString, XalanNode &fragBase, const XalanDOMString &xmlBaseIdent, bool isRoot, StylesheetConstructionContext &constructionContext) |
Reset the state of the XSL processor by reading in a new XSL stylesheet from a processing instruction. More... | |
void | flushPending () |
Flush the pending element. More... | |
void | addResultNamespaceDecl (const XalanDOMString &prefix, const XalanDOMString &namespaceVal) |
Add a namespace declaration to the namespace stack. More... | |
void | addResultNamespaceDecl (const XalanDOMString &prefix, const XalanDOMChar *namespaceVal, size_type len) |
Add a namespace declaration to the namespace stack. More... | |
void | addResultAttribute (AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const Locator *locator=0) |
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack. More... | |
void | addResultAttribute (AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const Locator *locator=0) |
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack. More... | |
void | addResultAttribute (AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMChar *value, size_type theLength, bool fromCopy=false, const Locator *locator=0) |
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack. More... | |
void | addResultAttribute (const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const Locator *locator=0) |
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack. More... | |
void | addResultAttribute (const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const Locator *locator=0) |
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack. More... | |
void | reportDuplicateNamespaceNodeError (const XalanDOMString &theName, const Locator *locator) |
Report an error copying a duplicate namespace node. More... | |
void | setDocumentLocator (const Locator *locator) |
void | startDocument () |
void | endDocument () |
void | startElement (const XalanDOMChar *name, AttributeListType &atts) |
void | endElement (const XalanDOMChar *name) |
void | characters (const XalanDOMChar *ch, size_type length) |
void | ignorableWhitespace (const XalanDOMChar *ch, size_type length) |
void | processingInstruction (const XalanDOMChar *target, const XalanDOMChar *data) |
void | resetDocument () |
void | characters (const XalanDOMChar *ch, size_type start, size_type length) |
Receive notification of character data. More... | |
void | characters (const XalanNode &node) |
Send character data from the node to the result tree. More... | |
void | characters (const XObjectPtr &xobject) |
Send character data from an XObject to the result tree. More... | |
void | startElement (const XalanDOMChar *name) |
Receive notification of the beginning of an element with an empty attribute list. More... | |
void | charactersRaw (const XalanDOMChar *ch, size_type start, size_type length) |
Receive notification of character data. More... | |
void | charactersRaw (const XalanNode &node) |
Send raw character data from the node to the result tree. More... | |
void | charactersRaw (const XObjectPtr &xobject) |
Send raw character data from an XObject to the result tree. More... | |
void | comment (const XalanDOMChar *data) |
Called when a Comment is to be constructed. More... | |
void | entityReference (const XalanDOMChar *data) |
Receive notification of a entityReference. More... | |
void | cdata (const XalanDOMChar *ch, size_type start, size_type length) |
Receive notification of cdata. More... | |
void | cloneToResultTree (const XalanNode &node, bool cloneTextNodesOnly, const Locator *locator) |
Clone a node to the result tree. More... | |
void | cloneToResultTree (const XalanNode &node, XalanNode::NodeType nodeType, bool overrideStrip, bool shouldCloneAttributes, bool cloneTextNodesOnly, const Locator *locator) |
Clone a node to the result tree. More... | |
void | outputToResultTree (const XObject &value, bool outputTextNodesOnly, const Locator *locator) |
Output an object to the result tree by doing the right conversions. More... | |
void | outputResultTreeFragment (const XObject &theTree, bool outputTextNodesOnly, const Locator *locator) |
Given a result tree fragment, walk the tree and output it to the result stream. More... | |
void | outputResultTreeFragment (const XalanDocumentFragment &theTree, bool outputTextNodesOnly, const Locator *locator) |
Given a result tree fragment, walk the tree and output it to the result stream. More... | |
virtual const StylesheetRoot * | getStylesheetRoot () const |
Retrieve the root stylesheet. More... | |
virtual void | setStylesheetRoot (const StylesheetRoot *theStylesheet) |
Set the root stylesheet. More... | |
virtual void | setExecutionContext (StylesheetExecutionContext *theExecutionContext) |
Set the execution context. More... | |
bool | getQuietConflictWarnings () const |
Whether to warn about pattern match conflicts. More... | |
const XalanDOMString * | getResultNamespaceForPrefix (const XalanDOMString &prefix) const |
Retrieve the result namespace corresponding to a prefix. More... | |
const XalanDOMString * | getResultPrefixForNamespace (const XalanDOMString &theNamespace) const |
Retrieve the result prefix corresponding to a namespace. More... | |
bool | isPendingResultPrefix (const XalanDOMString &thePrefix) const |
Determine whether or not a prefix is in use on the pending element or the pending attributes. More... | |
double | evalMatchPatternStr (const XalanDOMString &str, XalanNode *context, XPathExecutionContext &executionContext) |
Evaluate an xpath string and return the result as a numberic score. More... | |
const XPath * | createMatchPattern (const XalanDOMString &str, const PrefixResolver &resolver) |
Create and initialize an xpath and return it. More... | |
void | returnXPath (const XPath *xpath) |
Return the xpath created by createXPath() or createMatchPattern(). More... | |
void | copyNamespaceAttributes (const XalanNode &src) |
Copy XMLNS: attributes in if not already in scope. More... | |
const XObjectPtr | evalXPathStr (const XalanDOMString &str, XPathExecutionContext &executionContext) |
Evaluate an xpath string and return the result. More... | |
const XObjectPtr | evalXPathStr (const XalanDOMString &str, XalanNode *contextNode, const PrefixResolver &prefixResolver, XPathExecutionContext &executionContext) |
Evaluate an xpath string and return the result. More... | |
const XObjectPtr | evalXPathStr (const XalanDOMString &str, XalanNode *contextNode, const XalanElement &prefixResolver, XPathExecutionContext &executionContext) |
Evaluate an xpath string and return the result. More... | |
void | copyAttributeToTarget (const XalanDOMString &attrName, const XalanDOMString &attrValue, AttributeListImpl &attrList) |
Copy an attribute to an AttributeListImpl. More... | |
XPathFactory & | getXPathFactory () |
Get the factory for making xpaths. More... | |
XPathProcessor & | getXPathProcessor () |
Get the XPath processor object. More... | |
virtual void | reset () |
Reset the state. More... | |
XPathEnvSupport & | getXPathEnvSupport () |
Retrieve the XPath environment support object. More... | |
void | setProblemListener (ProblemListener *l) |
Set the problem listener property. More... | |
ProblemListener * | getProblemListener () const |
Get the problem listener property. More... | |
void | pushOutputContext (FormatterListener *theListener) |
void | popOutputContext () |
bool | getHasPendingStartDocument () const |
void | setHasPendingStartDocument (bool b) |
bool | getMustFlushPendingStartDocument () const |
void | setMustFlushPendingStartDocument (bool b) |
const AttributeListType & | getPendingAttributes () const |
Get the list of attributes yet to be processed. More... | |
void | setPendingAttributes (const AttributeListType &pendingAttributes) |
Set the list of attributes yet to be processed. More... | |
void | replacePendingAttribute (const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue) |
Replace the contents of a pending attribute. More... | |
bool | isElementPending () const |
const XalanDOMString & | getPendingElementName () const |
Retrieve name of the pending element currently being processed. More... | |
void | setPendingElementName (const XalanDOMString &elementName) |
Changes the currently pending element name. More... | |
void | setPendingElementName (const XalanDOMChar *elementName) |
const Locator * | getLocatorFromStack () const |
Get the locator from the top of the locator stack. More... | |
void | pushLocatorOnStack (const Locator *locator) |
Push a locator on to the locator stack. More... | |
void | popLocatorStack () |
Pop the locator from the top of the locator stack. More... | |
void | clearTopLevelParams () |
Reset the vector of top level parameters. More... | |
Public Member Functions inherited from xalanc::XSLTProcessor | |
XSLTProcessor () | |
virtual | ~XSLTProcessor () |
Public Member Functions inherited from xalanc::ProblemListenerBase | |
ProblemListenerBase () | |
virtual | ~ProblemListenerBase () |
Public Member Functions inherited from xalanc::PrefixResolver | |
PrefixResolver () | |
PrefixResolver (const PrefixResolver &) | |
virtual | ~PrefixResolver () |
Static Public Member Functions | |
static void | initialize (MemoryManager &theManager) |
Perform initialization of statics – must be called before any processing occurs. More... | |
static void | terminate () |
Perform termination of statics. More... | |
static const XalanDOMString & | getXSLNameSpaceURL () |
Retrieve the URI for the current XSL namespace, for example, "http://www.w3.org/1999/XSL/Transform". More... | |
static const XalanDOMString & | getXalanXSLNameSpaceURL () |
Special Xalan namespace for built-in extensions. More... | |
Static Public Member Functions inherited from xalanc::ProblemListenerBase | |
static void | defaultFormat (PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode) |
Function to format a problem call to a PrintWriter instance. More... | |
static void | defaultFormat (PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode) |
Function to format a problem call to a PrintWriter instance. More... | |
Protected Member Functions | |
const AttributeListImpl & | getPendingAttributesImpl () const |
Get the list of attributes yet to be processed. More... | |
AttributeListImpl & | getPendingAttributesImpl () |
Get the list of attributes yet to be processed. More... | |
void | setPendingAttributesImpl (const AttributeListType &pendingAttributes) |
Set the list of attributes yet to be processed. More... | |
const XalanDOMString & | getPendingElementNameImpl () const |
Retrieve name of the pending element currently being processed. More... | |
XalanDOMString & | getPendingElementNameImpl () |
Retrieve name of the pending element currently being processed. More... | |
void | setPendingElementNameImpl (const XalanDOMString &elementName) |
Changes the currently pending element name. More... | |
void | setPendingElementNameImpl (const XalanDOMChar *elementName) |
Changes the currently pending element name. More... | |
bool | getHasPendingStartDocumentImpl () const |
void | setHasPendingStartDocumentImpl (bool b) |
bool | getMustFlushPendingStartDocumentImpl () const |
void | setMustFlushPendingStartDocumentImpl (bool b) |
FormatterListener * | getFormatterListenerImpl () const |
void | setFormatterListenerImpl (FormatterListener *flistener) |
void | copyAttributesToAttList (const XalanNode &node, AttributeListImpl &attList) |
Copy the attributes from the XSL element to the created output element. More... | |
Protected Attributes | |
XalanDOMString | m_resultNameSpacePrefix |
The namespace that the result tree conforms to. More... | |
XalanDOMString | m_resultNameSpaceURL |
The URL that belongs to the result namespace. More... | |
XPathFactory & | m_xpathFactory |
XObjectFactory & | m_xobjectFactory |
const XPathProcessorPtrType | m_xpathProcessor |
BoolVectorType | m_cdataStack |
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text. More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from xalanc::ProblemListenerBase | |
static const XalanMessages::Codes | s_messageCodes [eSourceCount][eClassificationCount] |
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison, 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 process method is the primary public entry points.
If you reuse the processor instance, you should call reset() between calls.
Definition at line 131 of file XSLTEngineImpl.hpp.
typedef XalanVector<bool> xalanc::XSLTEngineImpl::BoolVectorType |
Definition at line 161 of file XSLTEngineImpl.hpp.
Definition at line 186 of file XSLTEngineImpl.hpp.
Definition at line 187 of file XSLTEngineImpl.hpp.
typedef XalanVector<const Locator*> xalanc::XSLTEngineImpl::LocatorStack |
Definition at line 157 of file XSLTEngineImpl.hpp.
Definition at line 189 of file XSLTEngineImpl.hpp.
Definition at line 185 of file XSLTEngineImpl.hpp.
Definition at line 158 of file XSLTEngineImpl.hpp.
Definition at line 159 of file XSLTEngineImpl.hpp.
Definition at line 184 of file XSLTEngineImpl.hpp.
Definition at line 183 of file XSLTEngineImpl.hpp.
xalanc::XSLTEngineImpl::XSLTEngineImpl | ( | MemoryManager & | theManager, |
XMLParserLiaison & | parserLiaison, | ||
XPathEnvSupport & | xpathEnvSupport, | ||
DOMSupport & | domSupport, | ||
XObjectFactory & | xobjectFactory, | ||
XPathFactory & | xpathFactory | ||
) |
Construct an XSL processor that can call back to a XML processor, so it can handle included files, and the like.
You must create a new instance of the XSLTEngineImpl class each time you run a transformation.
XMLParserLiaison | liaison to an object that can help with a specific parser implementation |
xpathEnvSupport | An XPathEnvSupport instance |
domSupport | A DOMSupport instance for the DOM being used |
xobjectFactory | object responsible for XObject objects |
xpathFactory | object responsible for XPath objects |
|
virtual |
|
inline |
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
attList | attribute list added to |
aname | name of attribute |
value | value of attribute |
fromCopy | true if the attribute is being copied from the source tree |
locator | The Locator for reporting errors. |
Definition at line 510 of file XSLTEngineImpl.hpp.
References xalanc::length().
void xalanc::XSLTEngineImpl::addResultAttribute | ( | AttributeListImpl & | attList, |
const XalanDOMString & | aname, | ||
const XalanDOMChar * | value, | ||
size_type | theLength, | ||
bool | fromCopy = false , |
||
const Locator * | locator = 0 |
||
) |
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
attList | attribute list added to |
aname | name of attribute |
value | value of attribute |
theLength | The length of the value |
fromCopy | true if the attribute is being copied from the source tree |
locator | The Locator for reporting errors. |
|
inline |
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
attList | attribute list added to |
aname | name of attribute |
value | value of attribute |
fromCopy | true if the attribute is being copied from the source tree |
locator | The Locator for reporting errors. |
Definition at line 484 of file XSLTEngineImpl.hpp.
References xalanc::XalanDOMString::c_str().
|
inline |
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
aname | name of attribute |
value | value of attribute |
fromCopy | true if the attribute is being copied from the source tree |
locator | The Locator for reporting errors. |
Definition at line 556 of file XSLTEngineImpl.hpp.
|
inline |
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
aname | name of attribute |
value | value of attribute |
fromCopy | true if the attribute is being copied from the source tree |
locator | The Locator for reporting errors. |
Definition at line 582 of file XSLTEngineImpl.hpp.
|
inline |
Add a namespace declaration to the namespace stack.
prefix | namespace prefix |
namespaceVal | value of namespace |
len | length of namespace |
Definition at line 462 of file XSLTEngineImpl.hpp.
|
inline |
Add a namespace declaration to the namespace stack.
prefix | namespace prefix |
namespaceVal | value of namespace |
Definition at line 444 of file XSLTEngineImpl.hpp.
References xalanc::XalanDOMString::c_str(), and xalanc::XalanDOMString::length().
|
virtual |
Add a trace listener for the purposes of debugging and diagnosis.
tl | pointer to listener to add |
Implements xalanc::XSLTProcessor.
Receive notification of cdata.
ch | pointer to characters from the XML document |
start | start position in the array |
length | number of characters to read from the array |
void xalanc::XSLTEngineImpl::characters | ( | const XalanDOMChar * | ch, |
size_type | length | ||
) |
void xalanc::XSLTEngineImpl::characters | ( | const XalanDOMChar * | ch, |
size_type | start, | ||
size_type | length | ||
) |
Receive notification of character data.
ch | pointer to characters from the XML document |
start | startng offset in 'ch' array |
length | number of characters to read from the array |
void xalanc::XSLTEngineImpl::characters | ( | const XalanNode & | node | ) |
Send character data from the node to the result tree.
node | The node to send. |
void xalanc::XSLTEngineImpl::characters | ( | const XObjectPtr & | xobject | ) |
Send character data from an XObject to the result tree.
node | The xobject to send. |
void xalanc::XSLTEngineImpl::charactersRaw | ( | const XalanDOMChar * | ch, |
size_type | start, | ||
size_type | length | ||
) |
Receive notification of character data.
If available, when the disable-output-escaping attribute is used, output raw text without escaping.
ch | pointer to characters from the XML document |
start | start position in the array |
length | number of characters to read from the array |
void xalanc::XSLTEngineImpl::charactersRaw | ( | const XalanNode & | node | ) |
Send raw character data from the node to the result tree.
node | The node to send. |
void xalanc::XSLTEngineImpl::charactersRaw | ( | const XObjectPtr & | xobject | ) |
Send raw character data from an XObject to the result tree.
node | The xobject to send. |
|
virtual |
Clear any stylesheet params.
Implements xalanc::XSLTProcessor.
|
inline |
Reset the vector of top level parameters.
Definition at line 1554 of file XSLTEngineImpl.hpp.
References xalanc::XalanVector< Type, ConstructionTraits >::clear().
void xalanc::XSLTEngineImpl::cloneToResultTree | ( | const XalanNode & | node, |
bool | cloneTextNodesOnly, | ||
const Locator * | locator | ||
) |
Clone a node to the result tree.
node | node to clone |
cloneTextNodesOnly | if true, only text nodes will be cloned |
locator | the Locator for the event, if any. |
void xalanc::XSLTEngineImpl::cloneToResultTree | ( | const XalanNode & | node, |
XalanNode::NodeType | nodeType, | ||
bool | overrideStrip, | ||
bool | shouldCloneAttributes, | ||
bool | cloneTextNodesOnly, | ||
const Locator * | locator | ||
) |
Clone a node to the result tree.
node | node to clone |
nodeType | the type of the node |
overrideStrip | false if white space stripping should be done |
shouldCloneAttributes | true if attributes should be cloned |
cloneTextNodesOnly | if true, only text nodes will be cloned |
locator | the Locator for the event, if any. |
void xalanc::XSLTEngineImpl::comment | ( | const XalanDOMChar * | data | ) |
Called when a Comment is to be constructed.
data | pointer to comment data |
|
protected |
Copy the attributes from the XSL element to the created output element.
void xalanc::XSLTEngineImpl::copyAttributeToTarget | ( | const XalanDOMString & | attrName, |
const XalanDOMString & | attrValue, | ||
AttributeListImpl & | attrList | ||
) |
Copy an attribute to an AttributeListImpl.
attrName | The name of the attribute |
attrValue | The value of the attribute |
attrList | The attribute list added to |
void xalanc::XSLTEngineImpl::copyNamespaceAttributes | ( | const XalanNode & | src | ) |
Copy XMLNS: attributes in if not already in scope.
src | source node |
const XPath* xalanc::XSLTEngineImpl::createMatchPattern | ( | const XalanDOMString & | str, |
const PrefixResolver & | resolver | ||
) |
void xalanc::XSLTEngineImpl::endDocument | ( | ) |
void xalanc::XSLTEngineImpl::endElement | ( | const XalanDOMChar * | name | ) |
void xalanc::XSLTEngineImpl::entityReference | ( | const XalanDOMChar * | data | ) |
Receive notification of a entityReference.
data | pointer to characters from the XML document |
SAXException |
double xalanc::XSLTEngineImpl::evalMatchPatternStr | ( | const XalanDOMString & | str, |
XalanNode * | context, | ||
XPathExecutionContext & | executionContext | ||
) |
Evaluate an xpath string and return the result as a numberic score.
str | string to evaluate |
context | context node |
executionContext | current execution context |
const XObjectPtr xalanc::XSLTEngineImpl::evalXPathStr | ( | const XalanDOMString & | str, |
XalanNode * | contextNode, | ||
const PrefixResolver & | prefixResolver, | ||
XPathExecutionContext & | executionContext | ||
) |
Evaluate an xpath string and return the result.
str | string to evaluate |
contextNode | context node |
prefixResolver | prefix resolver to use |
executionContext | current execution context |
const XObjectPtr xalanc::XSLTEngineImpl::evalXPathStr | ( | const XalanDOMString & | str, |
XalanNode * | contextNode, | ||
const XalanElement & | prefixResolver, | ||
XPathExecutionContext & | executionContext | ||
) |
Evaluate an xpath string and return the result.
str | string to evaluate |
contextNode | context node |
prefixResolver | prefix resolver to use |
executionContext | current execution context |
const XObjectPtr xalanc::XSLTEngineImpl::evalXPathStr | ( | const XalanDOMString & | str, |
XPathExecutionContext & | executionContext | ||
) |
Evaluate an xpath string and return the result.
str | string to evaluate |
executionContext | current execution context |
|
virtual |
|
virtual |
|
virtual |
void xalanc::XSLTEngineImpl::flushPending | ( | ) |
Flush the pending element.
|
virtual |
Get the current formatter listener.
Implements xalanc::XSLTProcessor.
|
inlineprotected |
Definition at line 1366 of file XSLTEngineImpl.hpp.
|
inline |
Definition at line 1101 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Definition at line 1330 of file XSLTEngineImpl.hpp.
|
inline |
Get the locator from the top of the locator stack.
Definition at line 1216 of file XSLTEngineImpl.hpp.
|
inline |
Definition at line 224 of file XSLTEngineImpl.hpp.
|
inline |
Definition at line 218 of file XSLTEngineImpl.hpp.
|
inline |
Definition at line 1121 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Definition at line 1350 of file XSLTEngineImpl.hpp.
|
virtual |
Retrieve a namespace corresponding to a prefix.
This assumes that the PrevixResolver hold's its own namespace context, or is a namespace context itself.
prefix | Prefix to resolve |
Implements xalanc::PrefixResolver.
|
inline |
Get the list of attributes yet to be processed.
Definition at line 1142 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Get the list of attributes yet to be processed.
Definition at line 1263 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Get the list of attributes yet to be processed.
Definition at line 1252 of file XSLTEngineImpl.hpp.
|
inline |
Retrieve name of the pending element currently being processed.
Definition at line 1188 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Retrieve name of the pending element currently being processed.
Definition at line 1296 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Retrieve name of the pending element currently being processed.
Definition at line 1285 of file XSLTEngineImpl.hpp.
|
inline |
Get the problem listener property.
The XSL class can have a single listener that can be informed of errors and warnings, and can normally control if an exception is thrown or not (or the problem listeners can throw their own RuntimeExceptions).
Definition at line 1071 of file XSLTEngineImpl.hpp.
|
inline |
Whether to warn about pattern match conflicts.
Definition at line 874 of file XSLTEngineImpl.hpp.
const XalanDOMString* xalanc::XSLTEngineImpl::getResultNamespaceForPrefix | ( | const XalanDOMString & | prefix | ) | const |
Retrieve the result namespace corresponding to a prefix.
prefix | prefix for namespace |
const XalanDOMString* xalanc::XSLTEngineImpl::getResultPrefixForNamespace | ( | const XalanDOMString & | theNamespace | ) | const |
Retrieve the result prefix corresponding to a namespace.
theNamespace | namespace for prefix |
|
virtual |
Given an input source, get the source tree.
inputSource | pointer to input source |
Implements xalanc::XSLTProcessor.
Stylesheet* xalanc::XSLTEngineImpl::getStylesheetFromPIURL | ( | const XalanDOMString & | xslURLString, |
XalanNode & | fragBase, | ||
const XalanDOMString & | xmlBaseIdent, | ||
bool | isRoot, | ||
StylesheetConstructionContext & | constructionContext | ||
) |
Reset the state of the XSL processor by reading in a new XSL stylesheet from a processing instruction.
xslURLString | valid URI to an XSL stylesheet |
fragBase | base of tree if URI represents document fragment |
xmlBaseIdent | base identifier for stylesheet URI |
isRoot | true if stylesheet is root of tree |
constructionContext | context for construction of object |
|
virtual |
|
virtual |
Determine the number of trace listeners.
Implements xalanc::XSLTProcessor.
|
virtual |
If this is set to true, simple traces of template calls are made.
Implements xalanc::XSLTProcessor.
|
virtual |
Generate a random namespace prefix guaranteed to be unique.
theValue | A string for returning the new prefix |
Implements xalanc::XSLTProcessor.
|
virtual |
|
inlinestatic |
Special Xalan namespace for built-in extensions.
Definition at line 863 of file XSLTEngineImpl.hpp.
|
virtual |
Get the XML Parser Liaison that this processor uses.
Implements xalanc::XSLTProcessor.
|
inline |
Retrieve the XPath environment support object.
Definition at line 1043 of file XSLTEngineImpl.hpp.
|
inline |
Get the factory for making xpaths.
Definition at line 1014 of file XSLTEngineImpl.hpp.
|
inline |
Get the XPath processor object.
Definition at line 1025 of file XSLTEngineImpl.hpp.
|
inlinestatic |
Retrieve the URI for the current XSL namespace, for example, "http://www.w3.org/1999/XSL/Transform".
Definition at line 852 of file XSLTEngineImpl.hpp.
void xalanc::XSLTEngineImpl::ignorableWhitespace | ( | const XalanDOMChar * | ch, |
size_type | length | ||
) |
|
static |
Perform initialization of statics – must be called before any processing occurs.
See class XSLTInit.
|
inline |
Definition at line 1177 of file XSLTEngineImpl.hpp.
bool xalanc::XSLTEngineImpl::isPendingResultPrefix | ( | const XalanDOMString & | thePrefix | ) | const |
Determine whether or not a prefix is in use on the pending element or the pending attributes.
thePrefix | prefix for namespace |
void xalanc::XSLTEngineImpl::outputResultTreeFragment | ( | const XalanDocumentFragment & | theTree, |
bool | outputTextNodesOnly, | ||
const Locator * | locator | ||
) |
Given a result tree fragment, walk the tree and output it to the result stream.
theTree | result tree fragment |
outputTextNodesOnly | if true, only text nodes will be copied |
locator | the Locator for the event, if any. |
|
inline |
Given a result tree fragment, walk the tree and output it to the result stream.
theTree | result tree fragment |
outputTextNodesOnly | if true, only text nodes will be copied |
locator | the Locator for the event, if any. |
Definition at line 796 of file XSLTEngineImpl.hpp.
References xalanc::XObject::rtree().
void xalanc::XSLTEngineImpl::outputToResultTree | ( | const XObject & | value, |
bool | outputTextNodesOnly, | ||
const Locator * | locator | ||
) |
Output an object to the result tree by doing the right conversions.
value | the XObject to output |
outputTextNodesOnly | if true, only text nodes will be copied |
locator | the Locator for the event, if any. |
XalanDocument* xalanc::XSLTEngineImpl::parseXML | ( | const InputSource & | inputSource, |
DocumentHandler * | docHandler, | ||
XalanDocument * | docToRegister, | ||
ErrorHandler * | theErrorHandler = 0 |
||
) |
Read in the XML file, either producing a Document or calling SAX events, and register the document in a table.
If the document has already been read in, it will not be reparsed.
inputSource | location of the XML |
docHandler | pointer to SAX event handler |
docToRegister | if using a SAX event handler, the object to register in the source docs table. |
SAXException |
XalanDocument* xalanc::XSLTEngineImpl::parseXML | ( | const XalanDOMString & | urlString, |
DocumentHandler * | docHandler, | ||
XalanDocument * | docToRegister, | ||
ErrorHandler * | theErrorHandler = 0 |
||
) |
Read in the XML file, either producing a Document or calling SAX events, and register the document in a table.
If the document has already been read in, it will not be reparsed.
urlString | location of the XML |
docHandler | pointer to SAX event handler |
docToRegister | if using a SAX event handler, the object to register in the source docs table. |
SAXException |
|
inline |
Pop the locator from the top of the locator stack.
Definition at line 1236 of file XSLTEngineImpl.hpp.
|
inline |
Definition at line 1091 of file XSLTEngineImpl.hpp.
|
virtual |
Function that is called when a problem event occurs.
source | Either eXMLParser, eXSLProcessor, or eXPATH. |
classification | Either eMessage, eWarning, or eError. |
locator | The current Locator instance for the stylesheet. Maybe be a null pointer. |
sourceNode | The current source node, if any. |
msg | The error message. |
Implements xalanc::XSLTProcessor.
|
virtual |
Function that is called when a problem event occurs.
This version assumes location information is already formatted into the message.
source | either eXMLPARSER, eXSLPROCESSOR, or eXPATH |
classification | either eMESSAGE, eERROR or eWARNING |
msg | string message explaining the problem. |
Implements xalanc::XSLTProcessor.
|
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 |
Implements xalanc::XSLTProcessor.
|
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 |
Implements xalanc::XSLTProcessor.
void xalanc::XSLTEngineImpl::processingInstruction | ( | const XalanDOMChar * | target, |
const XalanDOMChar * | data | ||
) |
|
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 |
Implements xalanc::XSLTProcessor.
|
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 |
Implements xalanc::XSLTProcessor.
|
inline |
Push a locator on to the locator stack.
A | pointer to the Locator to push. |
Definition at line 1227 of file XSLTEngineImpl.hpp.
|
inline |
Definition at line 1082 of file XSLTEngineImpl.hpp.
|
virtual |
Remove a trace listener.
tl | Trace listener to be removed. |
Implements xalanc::XSLTProcessor.
|
inline |
Replace the contents of a pending attribute.
theName | name of attribute |
theNewType | type of attribute |
theNewValue | new value of attribute |
Definition at line 1166 of file XSLTEngineImpl.hpp.
void xalanc::XSLTEngineImpl::reportDuplicateNamespaceNodeError | ( | const XalanDOMString & | theName, |
const Locator * | locator | ||
) |
Report an error copying a duplicate namespace node.
theName | The name of the node. |
|
virtual |
Reset the state.
This needs to be called after a process() call is invoked, if the processor is to be used again.
Implements xalanc::XSLTProcessor.
void xalanc::XSLTEngineImpl::resetDocument | ( | ) |
|
virtual |
Resolve the params that were pushed by the caller.
Implements xalanc::XSLTProcessor.
void xalanc::XSLTEngineImpl::returnXPath | ( | const XPath * | xpath | ) |
Return the xpath created by createXPath() or createMatchPattern().
xpath | The XPath to return. |
|
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 |
Implements xalanc::XSLTProcessor.
void xalanc::XSLTEngineImpl::setDocumentLocator | ( | const Locator * | locator | ) |
|
virtual |
Set the execution context.
theExecutionContext | pointer to new execution context. |
Implements xalanc::XSLTProcessor.
|
virtual |
Set the current formatter listener.
flistener | pointer to new formatter listener |
Implements xalanc::XSLTProcessor.
|
inlineprotected |
Definition at line 1372 of file XSLTEngineImpl.hpp.
|
inline |
Definition at line 1111 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Definition at line 1340 of file XSLTEngineImpl.hpp.
|
inline |
Definition at line 1131 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Definition at line 1360 of file XSLTEngineImpl.hpp.
|
inline |
Set the list of attributes yet to be processed.
pendingAttributes | The attribute list |
Definition at line 1153 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Set the list of attributes yet to be processed.
pendingAttributes | The attribute list |
Definition at line 1274 of file XSLTEngineImpl.hpp.
|
inline |
Definition at line 1205 of file XSLTEngineImpl.hpp.
|
inline |
Changes the currently pending element name.
elementName | new name of element |
Definition at line 1199 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Changes the currently pending element name.
elementName | new name of element |
Definition at line 1318 of file XSLTEngineImpl.hpp.
|
inlineprotected |
Changes the currently pending element name.
elementName | new name of element |
Definition at line 1307 of file XSLTEngineImpl.hpp.
|
inline |
Set the problem listener property.
The XSL class can have a single listener that can be informed of errors and warnings, and can normally control if an exception is thrown or not (or the problem listeners can throw their own RuntimeExceptions).
l | pointer to ProblemListener interface |
Definition at line 1057 of file XSLTEngineImpl.hpp.
|
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. |
Implements xalanc::XSLTProcessor.
|
virtual |
Set a top-level parameter, which the stylesheet can access with a top-level xsl:param.
Top-level params are "sticky," and must be removed with a call to clearStylesheetParams().
key | name of the param |
expression | expression that will be evaluated |
Implements xalanc::XSLTProcessor.
|
virtual |
Set a top-level parameter, which the stylesheet can access with a top-level xsl:param.
Top-level params are "sticky," and must be removed with a call to clearStylesheetParams().
key | name of the parameter |
value | XObject value for parameter |
Implements xalanc::XSLTProcessor.
|
virtual |
Set the root stylesheet.
theStylesheet | pointer to new root stylesheet |
Implements xalanc::XSLTProcessor.
|
virtual |
void xalanc::XSLTEngineImpl::startDocument | ( | ) |
void xalanc::XSLTEngineImpl::startElement | ( | const XalanDOMChar * | name | ) |
Receive notification of the beginning of an element with an empty attribute list.
name | element type name |
void xalanc::XSLTEngineImpl::startElement | ( | const XalanDOMChar * | name, |
AttributeListType & | atts | ||
) |
|
static |
Perform termination of statics.
See class XSLTInit.
|
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. |
Implements xalanc::XSLTProcessor.
|
protected |
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text.
Definition at line 1413 of file XSLTEngineImpl.hpp.
|
protected |
The namespace that the result tree conforms to.
A null value indicates that result-ns is not used and there is no checking. A empty string indicates that the result tree conforms to the default namespace.
Definition at line 1383 of file XSLTEngineImpl.hpp.
|
protected |
The URL that belongs to the result namespace.
Definition at line 1388 of file XSLTEngineImpl.hpp.
|
protected |
Definition at line 1404 of file XSLTEngineImpl.hpp.
|
protected |
Definition at line 1401 of file XSLTEngineImpl.hpp.
|
protected |
Definition at line 1407 of file XSLTEngineImpl.hpp.
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on Sun May 31 2020 10:37:41 for Xalan-C++ API Reference by 1.8.17