Xalan-C++ API Documentation
Xalan-C++ API Documentation
The Xalan C++ XSLT Processor Version 1.10
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
XSLTEngineImpl Class Reference
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 <XSLTEngineImpl.hpp>
Inheritance diagram for XSLTEngineImpl:
[legend]Collaboration diagram for XSLTEngineImpl:
[legend]List of all members.Public Types
Public Methods
- XSLTEngineImpl (MemoryManagerType &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 ()
- MemoryManagerType& getMemoryManager ()
- 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)
- Push a top-level stylesheet parameter. More...
- virtual void setStylesheetParam (const XalanDOMString &key, XObjectPtr value)
- Push a top-level stylesheet parameter. 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, DocumentHandlerType *docHandler, XalanDocument *docToRegister)
- Read in the XML file, either producing a Document or calling SAX events, and register the document in a table. More...
- XalanDocument* parseXML (const InputSourceType &inputSource, DocumentHandlerType *docHandler, XalanDocument *docToRegister)
- 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, XalanDOMString::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 LocatorType *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 LocatorType *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, XalanDOMString::size_type theLength, bool fromCopy=false, const LocatorType *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 LocatorType *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 LocatorType *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 LocatorType *locator)
- Report an error copying a duplicate namespace node. More...
- void setDocumentLocator (const LocatorType *locator)
- void startDocument ()
- void endDocument ()
- void startElement (const XalanDOMChar *name, AttributeListType &atts)
- void endElement (const XalanDOMChar *name)
- void characters (const XalanDOMChar *ch, XalanDOMString::size_type length)
- void ignorableWhitespace (const XalanDOMChar *ch, XalanDOMString::size_type length)
- void processingInstruction (const XalanDOMChar *target, const XalanDOMChar *data)
- void resetDocument ()
- void characters (const XalanDOMChar *ch, XalanDOMString::size_type start, XalanDOMString::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, XalanDOMString::size_type start, XalanDOMString::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, XalanDOMString::size_type start, XalanDOMString::size_type length)
- Receive notification of cdata. More...
- void cloneToResultTree (const XalanNode &node, bool cloneTextNodesOnly, const LocatorType *locator)
- Clone a node to the result tree. More...
- void cloneToResultTree (const XalanNode &node, XalanNode::NodeType nodeType, bool overrideStrip, bool shouldCloneAttributes, bool cloneTextNodesOnly, const LocatorType *locator)
- Clone a node to the result tree. More...
- void outputToResultTree (const XObject &value, bool outputTextNodesOnly, const LocatorType *locator)
- Output an object to the result tree by doing the right conversions. More...
- void outputResultTreeFragment (const XObject &theTree, bool outputTextNodesOnly, const LocatorType *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 LocatorType *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...
- virtual void message (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
- Report a message. More...
- virtual void message (const XalanDOMString &msg, const LocatorType &locator, const XalanNode *sourceNode=0) const
- Report a message. More...
- virtual void warn (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
- Report a warning. More...
- virtual void warn (const XalanDOMString &msg, const LocatorType &locator, const XalanNode *sourceNode=0) const
- Report a warning. More...
- virtual void error (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
- Report an error and throw an exception. More...
- virtual void error (const XalanDOMString &msg, const LocatorType &locator, const XalanNode *sourceNode=0) const
- Report an error and throw an exception. 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 LocatorType* getLocatorFromStack () const
- Get the locator from the top of the locator stack. More...
- void pushLocatorOnStack (const LocatorType *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...
Static Public Methods
Protected Methods
Protected Attributes
Detailed Description
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.
Member Typedef Documentation
typedef XalanVector< bool > XSLTEngineImpl::BoolVectorType<bool>
|
|
typedef StylesheetExecutionContext::ParamVectorType XSLTEngineImpl::ParamVectorType
|
|
typedef Function::XObjectArgVectorType XSLTEngineImpl::XObjectArgVectorType
|
|
Constructor & Destructor Documentation
|
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. -
Parameters:
-
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 |
|
XSLTEngineImpl::~XSLTEngineImpl (
|
) [virtual]
|
|
Member Function Documentation
|
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
-
Parameters:
-
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. |
|
void XSLTEngineImpl::addResultAttribute (
|
const XalanDOMString & aname,
|
|
const XalanDOMChar * value,
|
|
bool fromCopy = false,
|
|
const LocatorType * locator = 0 )
|
|
|
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
-
Parameters:
-
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. |
|
|
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
-
Parameters:
-
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. |
|
|
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
-
Parameters:
-
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. |
|
|
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
-
Parameters:
-
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. |
|
|
Add a namespace declaration to the namespace stack.
-
Parameters:
-
prefix
|
namespace prefix |
namespaceVal
|
value of namespace |
len
|
length of namespace |
|
|
Add a namespace declaration to the namespace stack.
-
Parameters:
-
prefix
|
namespace prefix |
namespaceVal
|
value of namespace |
|
void XSLTEngineImpl::addTraceListener (
|
TraceListener * tl ) [virtual]
|
|
|
Add a trace listener for the purposes of debugging and diagnosis.
-
Parameters:
-
tl
|
pointer to listener to add |
Reimplemented from XSLTProcessor. |
|
Receive notification of cdata.
-
Parameters:
-
ch
|
pointer to characters from the XML document |
start
|
start position in the array |
length
|
number of characters to read from the array |
|
void XSLTEngineImpl::characters (
|
const XObjectPtr & xobject )
|
|
|
Send character data from an XObject to the result tree.
-
Parameters:
-
node
|
The xobject to send. |
|
void XSLTEngineImpl::characters (
|
const XalanNode & node )
|
|
|
Send character data from the node to the result tree.
-
Parameters:
-
|
|
Receive notification of character data.
-
Parameters:
-
ch
|
pointer to characters from the XML document |
start
|
startng offset in 'ch' array |
length
|
number of characters to read from the array |
|
void XSLTEngineImpl::charactersRaw (
|
const XObjectPtr & xobject )
|
|
|
Send raw character data from an XObject to the result tree.
-
Parameters:
-
node
|
The xobject to send. |
|
void XSLTEngineImpl::charactersRaw (
|
const XalanNode & node )
|
|
|
Send raw character data from the node to the result tree.
-
Parameters:
-
|
|
Receive notification of character data.
If available, when the disable-output-escaping attribute is used, output raw text without escaping. -
Parameters:
-
ch
|
pointer to characters from the XML document |
start
|
start position in the array |
length
|
number of characters to read from the array |
|
void XSLTEngineImpl::clearTopLevelParams (
|
)
|
|
|
Reset the vector of top level parameters.
|
void XSLTEngineImpl::cloneToResultTree (
|
const XalanNode & node,
|
|
XalanNode::NodeType nodeType,
|
|
bool overrideStrip,
|
|
bool shouldCloneAttributes,
|
|
bool cloneTextNodesOnly,
|
|
const LocatorType * locator )
|
|
|
Clone a node to the result tree.
-
Parameters:
-
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 XSLTEngineImpl::cloneToResultTree (
|
const XalanNode & node,
|
|
bool cloneTextNodesOnly,
|
|
const LocatorType * locator )
|
|
|
Clone a node to the result tree.
-
Parameters:
-
node
|
node to clone |
cloneTextNodesOnly
|
if true, only text nodes will be cloned |
locator
|
the Locator for the event, if any. |
|
void XSLTEngineImpl::comment (
|
const XalanDOMChar * data )
|
|
|
Called when a Comment is to be constructed.
-
Parameters:
-
data
|
pointer to comment data |
|
|
Copy an attribute to an AttributeListImpl.
-
Parameters:
-
attrName
|
The name of the attribute |
attrValue
|
The value of the attribute |
attrList
|
The attribute list added to |
|
|
Copy the attributes from the XSL element to the created output element.
|
void XSLTEngineImpl::copyNamespaceAttributes (
|
const XalanNode & src )
|
|
|
Copy XMLNS: attributes in if not already in scope.
-
Parameters:
-
|
|
Create and initialize an xpath and return it.
-
Parameters:
-
str
|
string for XPath |
resolver
|
resolver for namespace resolution |
-
Returns:
-
pointer to XPath created
|
void XSLTEngineImpl::endDocument (
|
)
|
|
void XSLTEngineImpl::endElement (
|
const XalanDOMChar * name )
|
|
void XSLTEngineImpl::entityReference (
|
const XalanDOMChar * data )
|
|
|
Receive notification of a entityReference.
-
Parameters:
-
data
|
pointer to characters from the XML document |
-
Exceptions:
-
|
|
Report an error and throw an exception.
-
Parameters:
-
msg
|
text of message to output |
locator
|
A LocatorType for error reporting |
sourceNode
|
node in source where error occurred |
Reimplemented from XSLTProcessor. |
|
Report an error and throw an exception.
-
Parameters:
-
msg
|
text of message to output |
sourceNode
|
node in source where error occurred |
styleNode
|
node in stylesheet where error occurred |
Reimplemented from XSLTProcessor. |
|
Evaluate an xpath string and return the result as a numberic score.
-
Parameters:
-
str
|
string to evaluate |
context
|
context node |
executionContext
|
current execution context |
-
Returns:
-
score number, higher representing better match
|
|
Evaluate an xpath string and return the result.
-
Parameters:
-
str
|
string to evaluate |
contextNode
|
context node |
prefixResolver
|
prefix resolver to use |
executionContext
|
current execution context |
-
Returns:
-
pointer to XObject result
|
|
Evaluate an xpath string and return the result.
-
Parameters:
-
str
|
string to evaluate |
contextNode
|
context node |
prefixResolver
|
prefix resolver to use |
executionContext
|
current execution context |
-
Returns:
-
pointer to XObject result
|
|
Evaluate an xpath string and return the result.
-
Parameters:
-
str
|
string to evaluate |
executionContext
|
current execution context |
-
Returns:
-
pointer to XObject result
|
void XSLTEngineImpl::fireGenerateEvent (
|
const GenerateEvent & ge ) [virtual]
|
|
|
Fire a generate event.
-
Parameters:
-
ge
|
generate event to fire |
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::fireSelectEvent (
|
const SelectionEvent & se ) [virtual]
|
|
|
Fire a selection event.
-
Parameters:
-
se
|
selection event to fire |
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::fireTraceEvent (
|
const TracerEvent & te ) [virtual]
|
|
|
Fire a trace event.
-
Parameters:
-
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::flushPending (
|
)
|
|
|
Flush the pending element.
|
|
Get the current formatter listener.
-
Returns:
-
pointer to formatter listener
Reimplemented from XSLTProcessor. |
bool XSLTEngineImpl::getHasPendingStartDocument (
|
) const
|
|
bool XSLTEngineImpl::getHasPendingStartDocumentImpl (
|
) const [protected]
|
|
const LocatorType * XSLTEngineImpl::getLocatorFromStack (
|
) const
|
|
|
Get the locator from the top of the locator stack.
-
Returns:
-
A pointer to the Locator, or 0 if there is nothing on the stack.
|
bool XSLTEngineImpl::getMustFlushPendingStartDocument (
|
) const
|
|
bool XSLTEngineImpl::getMustFlushPendingStartDocumentImpl (
|
) const [protected]
|
|
|
Retrieve a namespace corresponding to a prefix.
This assumes that the PrevixResolver hold's its own namespace context, or is a namespace context itself. -
Parameters:
-
-
Returns:
-
namespace that prefix resolves to, or null if prefix is not found
Reimplemented from PrefixResolver. |
|
Get the list of attributes yet to be processed.
-
Returns:
-
attribute list
|
|
Get the list of attributes yet to be processed.
-
Returns:
-
attribute list
|
const AttributeListImpl & XSLTEngineImpl::getPendingAttributesImpl (
|
) const [protected]
|
|
|
Get the list of attributes yet to be processed.
-
Returns:
-
attribute list
|
const XalanDOMString & XSLTEngineImpl::getPendingElementName (
|
) const
|
|
|
Retrieve name of the pending element currently being processed.
-
Returns:
-
element name
|
XalanDOMString & XSLTEngineImpl::getPendingElementNameImpl (
|
) [protected]
|
|
|
Retrieve name of the pending element currently being processed.
-
Returns:
-
element name
|
const XalanDOMString & XSLTEngineImpl::getPendingElementNameImpl (
|
) const [protected]
|
|
|
Retrieve name of the pending element currently being processed.
-
Returns:
-
element name
|
|
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).
-
Returns:
-
pointer to ProblemListener interface
|
bool XSLTEngineImpl::getQuietConflictWarnings (
|
) const
|
|
|
Whether to warn about pattern match conflicts.
-
Returns:
-
true to not warn about pattern match conflicts
|
|
Retrieve the result namespace corresponding to a prefix.
-
Parameters:
-
prefix
|
prefix for namespace |
-
Returns:
-
string for namespace URI
|
|
Retrieve the result prefix corresponding to a namespace.
-
Parameters:
-
theNamespace
|
namespace for prefix |
-
Returns:
-
string for namespace prefix
|
|
Given an input source, get the source tree.
-
Parameters:
-
inputSource
|
pointer to input source |
-
Returns:
-
source tree
Reimplemented from XSLTProcessor. |
|
Reset the state of the XSL processor by reading in a new XSL stylesheet from a processing instruction.
-
Parameters:
-
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 |
-
Returns:
-
pointer to stylesheet
|
const StylesheetRoot * XSLTEngineImpl::getStylesheetRoot (
|
) const [virtual]
|
|
|
Retrieve the root stylesheet.
-
Returns:
-
pointer to root stylesheet
Reimplemented from XSLTProcessor. |
size_type XSLTEngineImpl::getTraceListeners (
|
) const [virtual]
|
|
|
Determine the number of trace listeners.
-
Returns:
-
number of listeners
Reimplemented from XSLTProcessor. |
bool XSLTEngineImpl::getTraceSelects (
|
) const [virtual]
|
|
|
If this is set to true, simple traces of template calls are made.
-
Returns:
-
true if traces made
Reimplemented from XSLTProcessor. |
|
Retrieve the base URI for the resolver.
-
Returns:
-
URI string
Reimplemented from PrefixResolver. |
void XSLTEngineImpl::getUniqueNamespaceValue (
|
XalanDOMString & theValue ) [virtual]
|
|
|
Generate a random namespace prefix guaranteed to be unique.
-
Parameters:
-
theValue
|
A string for returning the new prefix |
Reimplemented from XSLTProcessor. |
|
Get the XML Parser Liaison that this processor uses.
-
Returns:
-
XML parser liaison object
Reimplemented from XSLTProcessor. |
|
Retrieve the XPath environment support object.
-
Returns:
-
XPath environment support object
|
|
Get the factory for making xpaths.
-
Returns:
-
XPath factory object
|
const XalanDOMString & XSLTEngineImpl::getXSLNameSpaceURL (
|
) [static]
|
|
const XalanDOMString & XSLTEngineImpl::getXalanXSLNameSpaceURL (
|
) [static]
|
|
|
Special Xalan namespace for built-in extensions.
-
Returns:
-
Xalan namespace for extensions
|
|
Perform initialization of statics -- must be called before any processing occurs.
See class XSLTInit. |
bool XSLTEngineImpl::isElementPending (
|
) const
|
|
bool XSLTEngineImpl::isPendingResultPrefix (
|
const XalanDOMString & thePrefix ) const
|
|
|
Determine whether or not a prefix is in use on the pending element or the pending attributes.
-
Parameters:
-
thePrefix
|
prefix for namespace
|
-
Returns:
-
true if the prefix is in use, false if not.
|
|
Report a message.
-
Parameters:
-
msg
|
text of message to output |
locator
|
A LocatorType for error reporting |
sourceNode
|
node in source where message occurred |
Reimplemented from XSLTProcessor. |
|
Report a message.
-
Parameters:
-
msg
|
text of message to output |
sourceNode
|
node in source where message occurred |
styleNode
|
node in stylesheet where message occurred |
Reimplemented from XSLTProcessor. |
|
Given a result tree fragment, walk the tree and output it to the result stream.
-
Parameters:
-
theTree
|
result tree fragment |
outputTextNodesOnly
|
if true, only text nodes will be copied |
locator
|
the Locator for the event, if any. |
|
void XSLTEngineImpl::outputResultTreeFragment (
|
const XObject & theTree,
|
|
bool outputTextNodesOnly,
|
|
const LocatorType * locator )
|
|
|
Given a result tree fragment, walk the tree and output it to the result stream.
-
Parameters:
-
theTree
|
result tree fragment |
outputTextNodesOnly
|
if true, only text nodes will be copied |
locator
|
the Locator for the event, if any. |
|
void XSLTEngineImpl::outputToResultTree (
|
const XObject & value,
|
|
bool outputTextNodesOnly,
|
|
const LocatorType * locator )
|
|
|
Output an object to the result tree by doing the right conversions.
-
Parameters:
-
value
|
the XObject to output |
outputTextNodesOnly
|
if true, only text nodes will be copied |
locator
|
the Locator for the event, if any. |
|
|
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. -
Parameters:
-
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. |
-
Returns:
-
document object, which represents the parsed XML
-
Exceptions:
-
|
|
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. -
Parameters:
-
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. |
-
Returns:
-
document object, which represents the parsed XML
-
Exceptions:
-
|
void XSLTEngineImpl::popLocatorStack (
|
)
|
|
|
Pop the locator from the top of the locator stack.
|
void XSLTEngineImpl::popOutputContext (
|
)
|
|
|
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:
-
inputSource
|
input source |
outputTarget
|
output source tree |
executionContext
|
current execution context |
-
Exceptions:
-
Reimplemented from XSLTProcessor. |
|
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:
-
inputSource
|
input source |
stylesheetSource
|
stylesheet source |
outputTarget
|
output source tree |
constructionContext
|
context for construction of objects |
executionContext
|
current execution context |
-
Exceptions:
-
Reimplemented from XSLTProcessor. |
|
Given a URI to an XSL stylesheet, compile the stylesheet into an internal representation.
-
Parameters:
-
xmldocURLString
|
URI to the input XML document |
constructionContext
|
context for construction of objects |
-
Returns:
-
pointer to compiled stylesheet object
-
Exceptions:
-
Reimplemented from XSLTProcessor. |
|
Given a stylesheet input source, compile the stylesheet into an internal representation.
-
Parameters:
-
stylesheetSource
|
input source for the stylesheet |
constructionContext
|
context for construction of objects |
-
Returns:
-
pointer to the compiled stylesheet object
-
Exceptions:
-
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::processingInstruction (
|
const XalanDOMChar * target,
|
|
const XalanDOMChar * data )
|
|
void XSLTEngineImpl::pushLocatorOnStack (
|
const LocatorType * locator )
|
|
|
Push a locator on to the locator stack.
-
Parameters:
-
A
|
pointer to the Locator to push. |
|
void XSLTEngineImpl::removeTraceListener (
|
TraceListener * tl ) [virtual]
|
|
|
Remove a trace listener.
-
Parameters:
-
tl
|
Trace listener to be removed. |
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::replacePendingAttribute (
|
const XalanDOMChar * theName,
|
|
const XalanDOMChar * theNewType,
|
|
const XalanDOMChar * theNewValue )
|
|
|
Replace the contents of a pending attribute.
-
Parameters:
-
theName
|
name of attribute |
theNewType
|
type of attribute |
theNewValue
|
new value of attribute |
|
|
Report an error copying a duplicate namespace node.
-
Parameters:
-
theName
|
The name of the node. |
|
void XSLTEngineImpl::reset (
|
) [virtual]
|
|
|
Reset the state.
This needs to be called after a process() call is invoked, if the processor is to be used again.
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::resetDocument (
|
)
|
|
|
Resolve the params that were pushed by the caller.
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::returnXPath (
|
const XPath * xpath )
|
|
void XSLTEngineImpl::setDiagnosticsOutput (
|
PrintWriter * pw ) [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:
-
pw
|
pointer to print writer |
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::setDocumentLocator (
|
const LocatorType * locator )
|
|
|
Set the execution context.
-
Parameters:
-
theExecutionContext
|
pointer to new execution context. |
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::setFormatterListener (
|
FormatterListener * flistener ) [virtual]
|
|
|
Set the current formatter listener.
-
Parameters:
-
flistener
|
pointer to new formatter listener |
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::setFormatterListenerImpl (
|
FormatterListener * flistener ) [protected]
|
|
void XSLTEngineImpl::setHasPendingStartDocument (
|
bool b )
|
|
void XSLTEngineImpl::setHasPendingStartDocumentImpl (
|
bool b ) [protected]
|
|
void XSLTEngineImpl::setMustFlushPendingStartDocument (
|
bool b )
|
|
void XSLTEngineImpl::setMustFlushPendingStartDocumentImpl (
|
bool b ) [protected]
|
|
void XSLTEngineImpl::setPendingAttributes (
|
const AttributeListType & pendingAttributes )
|
|
|
Set the list of attributes yet to be processed.
-
Parameters:
-
pendingAttributes
|
The attribute list |
|
void XSLTEngineImpl::setPendingAttributesImpl (
|
const AttributeListType & pendingAttributes ) [protected]
|
|
|
Set the list of attributes yet to be processed.
-
Parameters:
-
pendingAttributes
|
The attribute list |
|
void XSLTEngineImpl::setPendingElementName (
|
const XalanDOMChar * elementName )
|
|
void XSLTEngineImpl::setPendingElementName (
|
const XalanDOMString & elementName )
|
|
|
Changes the currently pending element name.
-
Parameters:
-
elementName
|
new name of element |
|
void XSLTEngineImpl::setPendingElementNameImpl (
|
const XalanDOMChar * elementName ) [protected]
|
|
|
Changes the currently pending element name.
-
Parameters:
-
elementName
|
new name of element |
|
void XSLTEngineImpl::setPendingElementNameImpl (
|
const XalanDOMString & elementName ) [protected]
|
|
|
Changes the currently pending element name.
-
Parameters:
-
elementName
|
new name of element |
|
|
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). -
Parameters:
-
|
void XSLTEngineImpl::setQuietConflictWarnings (
|
bool b ) [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:
-
b
|
true if conflict warnings should be suppressed. |
Reimplemented from XSLTProcessor. |
|
Push a top-level stylesheet parameter.
This value can be evaluated via xsl:param-variable. -
Parameters:
-
key
|
name of the parameter |
value
|
XObject value for parameter |
Reimplemented from XSLTProcessor. |
|
Push 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 |
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::setStylesheetRoot (
|
const StylesheetRoot * theStylesheet ) [virtual]
|
|
|
Set the root stylesheet.
-
Parameters:
-
theStylesheet
|
pointer to new root stylesheet |
Reimplemented from XSLTProcessor. |
void XSLTEngineImpl::setTraceSelects (
|
bool b ) [virtual]
|
|
void XSLTEngineImpl::startDocument (
|
)
|
|
void XSLTEngineImpl::startElement (
|
const XalanDOMChar * name )
|
|
|
Receive notification of the beginning of an element with an empty attribute list.
-
Parameters:
-
|
void XSLTEngineImpl::startElement (
|
const XalanDOMChar * name,
|
|
AttributeListType & atts )
|
|
void XSLTEngineImpl::terminate (
|
) [static]
|
|
|
Perform termination of statics.
See class XSLTInit. |
|
Compose a diagnostic trace of the current selection.
-
Parameters:
-
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. |
Reimplemented from XSLTProcessor. |
|
Report a warning.
-
Parameters:
-
msg
|
text of message to output |
locator
|
A LocatorType for error reporting |
sourceNode
|
node in source where error occurred |
Reimplemented from XSLTProcessor. |
|
Report a warning.
-
Parameters:
-
msg
|
text of message to output |
sourceNode
|
node in source where warning occurred |
styleNode
|
node in stylesheet where warning occurred |
Reimplemented from XSLTProcessor. |
Member Data Documentation
|
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text.
|
|
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. |
|
The URL that belongs to the result namespace.
|
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++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.
|
|