Xalan-C++ API Documentation
Xalan-C++ API Documentation
The Xalan C++ XSLT Processor Version 1.4
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
XPathExecutionContextDefault Class Reference
A basic implementation of the class XPathExecutionContext.
More...
#include <XPathExecutionContextDefault.hpp>
Inheritance diagram for XPathExecutionContextDefault:
Collaboration diagram for XPathExecutionContextDefault:
List of all members.
Public Methods
- XPathExecutionContextDefault ( XPathEnvSupport& theXPathEnvSupport, DOMSupport& theDOMSupport, XObjectFactory& theXObjectFactory, XalanNode* theCurrentNode = 0, const NodeRefListBase* theContextNodeList = 0, const PrefixResolver* thePrefixResolver = 0)
- Construct an XPathExecutionContextDefault object. More...
- explicit XPathExecutionContextDefault ( XalanNode* theCurrentNode = 0, const NodeRefListBase* theContextNodeList = 0, const PrefixResolver* thePrefixResolver = 0)
- Construct an XPathExecutionContextDefault object. More...
- virtual ~XPathExecutionContextDefault ()
- void setXPathEnvSupport (XPathEnvSupport* theSupport)
- Set the XPathEnvSupport instance. More...
- void setDOMSupport (DOMSupport* theDOMSupport)
- Set the DOMSupport instance. More...
- void setXObjectFactory (XObjectFactory* theXObjectFactory)
- Set the XObjectFactory instance. More...
- virtual void reset ()
- Reset the instance. More...
- virtual XalanNode* getCurrentNode () const
- Retrieve the node currently being executed. More...
- virtual void setCurrentNode (XalanNode* theCurrentNode)
- Change the node currently being executed. More...
- virtual XObjectPtr createNodeSet (XalanNode& theNode)
- Convenience function for creating a node set with the supplied node as the only member. More...
- virtual bool isNodeAfter ( const XalanNode& node1, const XalanNode& node2) const
- Determine if a node is after another node, in document order. More...
- virtual const NodeRefListBase& getContextNodeList () const
- Retrieve node list for current context. More...
- virtual void setContextNodeList (const NodeRefListBase& theList)
- Set node list for current context. More...
- virtual size_type getContextNodeListLength () const
- virtual size_type getContextNodeListPosition (const XalanNode& contextNode) const
- virtual bool elementAvailable ( const XalanDOMString& theNamespace, const XalanDOMString& elementName) const
- Determine if an external element is available. More...
- virtual bool functionAvailable ( const XalanDOMString& theNamespace, const XalanDOMString& functionName) const
- Determine if a function is available. More...
- virtual const XObjectPtr extFunction ( const XalanDOMString& theNamespace, const XalanDOMString& functionName, XalanNode* context, const XObjectArgVectorType& argVec, const Locator* locator)
- Handle an extension function. More...
- virtual XalanDocument* parseXML ( const XalanDOMString& urlString, const XalanDOMString& base) const
- Provides support for XML parsing service. More...
- virtual MutableNodeRefList* borrowMutableNodeRefList ()
- Borrow a cached MutableNodeRefList instance. More...
- virtual bool returnMutableNodeRefList (MutableNodeRefList* theList)
- Return a previously borrowed MutableNodeRefList instance. More...
- virtual MutableNodeRefList* createMutableNodeRefList () const
- Create a MutableNodeRefList with the appropriate context. More...
- virtual XalanDOMString& getCachedString ()
- virtual bool releaseCachedString (XalanDOMString& theString)
- virtual void getNodeSetByKey ( XalanNode* doc, const XalanDOMString& name, const XalanDOMString& ref, const PrefixResolver& resolver, MutableNodeRefList& nodelist)
- Given a valid element key, return the corresponding node list. More...
- virtual const XObjectPtr getVariable ( const XalanQName& name, const Locator* locator = 0)
- Given a name, locate a variable in the current context, and return a pointer to the object. More...
- virtual const PrefixResolver* getPrefixResolver () const
- Retrieve the resolver for namespaces. More...
- virtual void setPrefixResolver (const PrefixResolver* thePrefixResolver)
- Change the resolver for namespaces. More...
- virtual const XalanDOMString* getNamespaceForPrefix (const XalanDOMString& prefix) const
- Retrieve the URI corresponding to a namespace prefix. More...
- virtual XalanDOMString findURIFromDoc (const XalanDocument* owner) const
- Given a DOM Document, tell what URI was used to parse it. More...
- virtual const XalanDOMString& getUnparsedEntityURI ( const XalanDOMString& theName, const XalanDocument& theDocument) const
- The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in the same document as the context node (see [3.3 Unparsed Entities]). More...
- virtual bool shouldStripSourceNode (const XalanNode& node)
- Tells, through the combination of the default-space attribute on xsl:stylesheet, xsl:strip-space, xsl:preserve-space, and the xml:space attribute, whether or not extra whitespace should be stripped from the node. More...
- virtual bool getThrowFoundIndex () const
- Tells if FoundIndex should be thrown if index is found. More...
- virtual void setThrowFoundIndex (bool fThrow)
- Changes whether FoundIndex should be thrown if index is found. More...
- virtual XalanDocument* getSourceDocument (const XalanDOMString& theURI) const
- virtual void setSourceDocument ( const XalanDOMString& theURI, XalanDocument* theDocument)
- Associate a document with a given URI. More...
- virtual const XalanDecimalFormatSymbols* getDecimalFormatSymbols (const XalanQName& qname)
- Retrieve the XalanDecimalFormatSymbols instance associated with the name. More...
- virtual void error ( const XalanDOMString& msg, const XalanNode* sourceNode = 0, const XalanNode* styleNode = 0) const
- Tell the user of an error, and throw an exception. More...
- virtual void error ( const XalanDOMString& msg, const XalanNode* sourceNode, const Locator* locator) const
- Tell the user of an error, and throw an exception. More...
- virtual void error ( const char* msg, const XalanNode* sourceNode = 0, const XalanNode* styleNode = 0) const
- Tell the user of an error, and throw an exception. More...
- virtual void error ( const char* msg, const XalanNode* sourceNode, const Locator* locator) const
- Tell the user of an error, and throw an exception. More...
- virtual void warn ( const XalanDOMString& msg, const XalanNode* sourceNode = 0, const XalanNode* styleNode = 0) const
- Tell the user of an warning. More...
- virtual void warn ( const XalanDOMString& msg, const XalanNode* sourceNode, const Locator* locator) const
- Tell the user of a warning. More...
- virtual void warn ( const char* msg, const XalanNode* sourceNode = 0, const XalanNode* styleNode = 0) const
- Tell the user of an warning, and probably throw an exception. More...
- virtual void warn ( const char* msg, const XalanNode* sourceNode, const Locator* locator) const
- Tell the user of a warning. More...
- virtual void message ( const XalanDOMString& msg, const XalanNode* sourceNode = 0, const XalanNode* styleNode = 0) const
- Output a message. More...
- virtual void message ( const XalanDOMString& msg, const XalanNode* sourceNode, const Locator* locator) const
- Output a message. More...
- virtual void message ( const char* msg, const XalanNode* sourceNode = 0, const XalanNode* styleNode = 0) const
- Output a message. More...
- virtual void message ( const char* msg, const XalanNode* sourceNode, const Locator* locator) const
- Output a message. More...
Protected Types
Protected Methods
Protected Attributes
Static Protected Attributes
Detailed Description
A basic implementation of the class XPathExecutionContext.
Member Typedef Documentation
Enumeration Value Documentation
XPathExecutionContextDefault::eNodeListCacheListSize = 50 [protected] |
|
Constructor & Destructor Documentation
Construct an XPathExecutionContextDefault object.
-
Parameters:
-
theXPathEnvSupport
|
XPathEnvSupport class instance
|
theDOMSupport
|
DOMSupport class instance
|
theXobjectFactory
|
factory class instance for XObjects
|
theCurrentNode
|
current node in the source tree
|
theContextNodeList
|
node list for current context
|
thePrefixResolver
|
pointer to prefix resolver to use
|
explicit XPathExecutionContextDefault::XPathExecutionContextDefault (
|
XalanNode * theCurrentNode = 0, |
|
const NodeRefListBase * theContextNodeList = 0, |
|
const PrefixResolver * thePrefixResolver = 0) |
|
Construct an XPathExecutionContextDefault object.
-
Parameters:
-
theXPathEnvSupport
|
XPathEnvSupport class instance
|
theXObjectFactory
|
factory class instance for XObjects
|
theCurrentNode
|
current node in the source tree
|
theContextNodeList
|
node list for current context
|
thePrefixResolver
|
pointer to prefix resolver to use
|
virtual XPathExecutionContextDefault::~XPathExecutionContextDefault () [virtual] |
|
Member Function Documentation
virtual MutableNodeRefList* XPathExecutionContextDefault::borrowMutableNodeRefList () [virtual] |
|
virtual MutableNodeRefList* XPathExecutionContextDefault::createMutableNodeRefList () const [virtual] |
|
virtual XObjectPtr XPathExecutionContextDefault::createNodeSet (
|
XalanNode & theNode) [virtual] |
|
Convenience function for creating a node set with the supplied node as the only member.
-
Parameters:
-
-
Returns:
-
a pointer to the XObject instance.
Reimplemented from XPathExecutionContext.
virtual bool XPathExecutionContextDefault::elementAvailable (
|
const XalanDOMString & theNamespace, |
|
const XalanDOMString & elementName) const [virtual] |
|
Determine if an external element is available.
-
Parameters:
-
theNamespace
|
namespace for the element
|
elementName
|
name of extension element
|
-
Returns:
-
whether the given element is available or not
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::error (
|
const char * msg, |
|
const XalanNode * sourceNode, |
|
const Locator * locator) const [virtual] |
|
Tell the user of an error, and throw an exception.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the error occurred. May be 0.
|
locator
|
A Locator to determine where the error occurred. May be 0.
|
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::error (
|
const char * msg, |
|
const XalanNode * sourceNode = 0, |
|
const XalanNode * styleNode = 0) const [virtual] |
|
Tell the user of an error, and throw an exception.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the error occurred
|
styleNode
|
node in stylesheet where the error occurred
|
Reimplemented from XPathExecutionContext.
Tell the user of an error, and throw an exception.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the error occurred. May be 0.
|
locator
|
A Locator to determine where the error occurred. May be 0.
|
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::error (
|
const XalanDOMString & msg, |
|
const XalanNode * sourceNode = 0, |
|
const XalanNode * styleNode = 0) const [virtual] |
|
Tell the user of an error, and throw an exception.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the error occurred
|
styleNode
|
node in stylesheet where the error occurred
|
Reimplemented from XPathExecutionContext.
Handle an extension function.
-
Parameters:
-
theNamespace
|
namespace of function
|
functionName
|
extension function name
|
context
|
The context node
|
argVec
|
vector of arguments to function
|
locator
|
A Locator instance for error reporting
|
-
Returns:
-
pointer to XObject result
Reimplemented from XPathExecutionContext.
Given a DOM Document, tell what URI was used to parse it.
Needed for
relative resolution.
-
Parameters:
-
-
Returns:
-
document URI
Reimplemented from XPathExecutionContext.
virtual bool XPathExecutionContextDefault::functionAvailable (
|
const XalanDOMString & theNamespace, |
|
const XalanDOMString & functionName) const [virtual] |
|
Determine if a function is available.
For standard
function availability, theNamespace should be an
empty string.
-
Parameters:
-
theNamespace
|
namespace for the function
|
functionName
|
name of the function
|
-
Returns:
-
whether the function is available or not
Reimplemented from XPathExecutionContext.
virtual XalanDOMString& XPathExecutionContextDefault::getCachedString () [virtual] |
|
virtual const NodeRefListBase& XPathExecutionContextDefault::getContextNodeList () const [virtual] |
|
virtual size_type XPathExecutionContextDefault::getContextNodeListLength () const [virtual] |
|
virtual size_type XPathExecutionContextDefault::getContextNodeListPosition (
|
const XalanNode & contextNode) const [virtual] |
|
virtual XalanNode* XPathExecutionContextDefault::getCurrentNode () const [virtual] |
|
Retrieve the node currently being executed.
-
Returns:
-
current node
Reimplemented from XPathExecutionContext.
Retrieve the URI corresponding to a namespace prefix.
-
Parameters:
-
prefix
|
prefix for a namespace
|
-
Returns:
-
URI corresponding to namespace
Reimplemented from XPathExecutionContext.
Given a valid element key, return the corresponding node list.
-
Parameters:
-
doc
|
source document
|
name
|
name of the key, which must match the 'name'
attribute on xsl:key
|
ref
|
value that must match the value found by the
'match' attribute on xsl:key
|
resolver
|
resolver for namespace resolution
|
nodelist
|
A node list to contain the nodes found
|
Reimplemented from XPathExecutionContext.
virtual const PrefixResolver* XPathExecutionContextDefault::getPrefixResolver () const [virtual] |
|
Retrieve the resolver for namespaces.
-
Returns:
-
object for namespace resolution
Reimplemented from XPathExecutionContext.
virtual bool XPathExecutionContextDefault::getThrowFoundIndex () const [virtual] |
|
The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in the same document as the context node (see [3.3 Unparsed Entities]).
It returns the empty string if
there is no such entity.
-
Parameters:
-
theName
|
name of entity
|
theDocument
|
document containing entity
|
-
Returns:
-
URI for the entity
Reimplemented from XPathExecutionContext.
Given a name, locate a variable in the current context, and return a pointer to the object.
-
Parameters:
-
-
Returns:
-
pointer to an XObject if the variable was found, 0 if it was not
Reimplemented from XPathExecutionContext.
virtual bool XPathExecutionContextDefault::isNodeAfter (
|
const XalanNode & node1, |
|
const XalanNode & node2) const [virtual] |
|
Determine if a node is after another node, in document order.
-
Parameters:
-
node1
|
The first node
|
node2
|
The second node
|
-
Returns:
-
true if node1 one is after node2, or false if it is not.
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::message (
|
const char * msg, |
|
const XalanNode * sourceNode, |
|
const Locator * locator) const [virtual] |
|
Output a message.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the message occurred. May be 0.
|
locator
|
A Locator to determine where the message occurred. May be 0.
|
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::message (
|
const char * msg, |
|
const XalanNode * sourceNode = 0, |
|
const XalanNode * styleNode = 0) const [virtual] |
|
Output a message.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the message occurred
|
styleNode
|
node in stylesheet where the message occurred
|
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::message (
|
const XalanDOMString & msg, |
|
const XalanNode * sourceNode, |
|
const Locator * locator) const [virtual] |
|
Output a message.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the message occurred. May be 0.
|
locator
|
A Locator to determine where the message occurred. May be 0.
|
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::message (
|
const XalanDOMString & msg, |
|
const XalanNode * sourceNode = 0, |
|
const XalanNode * styleNode = 0) const [virtual] |
|
Output a message.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where error occurred
|
styleNode
|
node in stylesheet where error occurred
|
Reimplemented from XPathExecutionContext.
Provides support for XML parsing service.
-
Parameters:
-
urlString
|
location of the XML
|
base
|
base location for URI
|
-
Returns:
-
parsed document
Reimplemented from XPathExecutionContext.
virtual bool XPathExecutionContextDefault::releaseCachedString (
|
XalanDOMString & theString) [virtual] |
|
virtual void XPathExecutionContextDefault::reset () [virtual] |
|
Reset the instance.
This must be called before another
execution is attempted.
Reimplemented from XPathExecutionContext.
virtual bool XPathExecutionContextDefault::returnMutableNodeRefList (
|
MutableNodeRefList * theList) [virtual] |
|
Return a previously borrowed MutableNodeRefList instance.
-
Parameters:
-
theList
|
A pointer the to previously borrowed instance.
|
-
Returns:
-
true if the list was borrowed (at therefore, destroyed), false if not.
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::setContextNodeList (
|
const NodeRefListBase & theList) [virtual] |
|
virtual void XPathExecutionContextDefault::setCurrentNode (
|
XalanNode * theCurrentNode) [virtual] |
|
Change the node currently being executed.
-
Parameters:
-
theCurrentNode
|
new current node
|
Reimplemented from XPathExecutionContext.
void XPathExecutionContextDefault::setDOMSupport (
|
DOMSupport * theDOMSupport) |
|
Set the DOMSupport instance.
-
Parameters:
-
theDOMSupport
|
a reference to the instance to use.
|
virtual void XPathExecutionContextDefault::setPrefixResolver (
|
const PrefixResolver * thePrefixResolver) [virtual] |
|
Change the resolver for namespaces.
-
Parameters:
-
thePrefixResolver
|
new object for namespace resolution
|
Reimplemented from XPathExecutionContext.
Associate a document with a given URI.
-
Parameters:
-
theURI
|
document URI
|
theDocument
|
source document
|
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::setThrowFoundIndex (
|
bool fThrow) [virtual] |
|
Changes whether FoundIndex should be thrown if index is found.
This is an
optimization for match patterns, and is used internally by the XPath
engine.
-
Parameters:
-
Reimplemented from XPathExecutionContext.
void XPathExecutionContextDefault::setXObjectFactory (
|
XObjectFactory * theXObjectFactory) |
|
Set the XObjectFactory instance.
-
Parameters:
-
theFactory
|
a reference to the instance to use.
|
void XPathExecutionContextDefault::setXPathEnvSupport (
|
XPathEnvSupport * theSupport) |
|
Set the XPathEnvSupport instance.
-
Parameters:
-
theSupport
|
a reference to the instance to use.
|
virtual bool XPathExecutionContextDefault::shouldStripSourceNode (
|
const XalanNode & node) [virtual] |
|
Tells, through the combination of the default-space attribute on xsl:stylesheet, xsl:strip-space, xsl:preserve-space, and the xml:space attribute, whether or not extra whitespace should be stripped from the node.
Literal elements from template elements should
not be tested with this function.
-
Parameters:
-
textNode
|
text node from the source tree
|
-
Returns:
-
true if the text node should be stripped of extra whitespace
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::warn (
|
const char * msg, |
|
const XalanNode * sourceNode, |
|
const Locator * locator) const [virtual] |
|
Tell the user of a warning.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the warning occurred. May be 0.
|
locator
|
A Locator to determine where the warning occurred. May be 0.
|
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::warn (
|
const char * msg, |
|
const XalanNode * sourceNode = 0, |
|
const XalanNode * styleNode = 0) const [virtual] |
|
Tell the user of an warning, and probably throw an exception.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the warning occurred
|
styleNode
|
node in stylesheet where the warning occurred
|
Reimplemented from XPathExecutionContext.
Tell the user of a warning.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the warning occurred. May be 0.
|
locator
|
A Locator to determine where the warning occurred. May be 0.
|
Reimplemented from XPathExecutionContext.
virtual void XPathExecutionContextDefault::warn (
|
const XalanDOMString & msg, |
|
const XalanNode * sourceNode = 0, |
|
const XalanNode * styleNode = 0) const [virtual] |
|
Tell the user of an warning.
-
Parameters:
-
msg
|
text of message to output
|
sourceNode
|
node in source where the warning occurred
|
styleNode
|
node in stylesheet where the warning occurred
|
Reimplemented from XPathExecutionContext.
Member Data Documentation
const NodeRefListBase * XPathExecutionContextDefault::m_contextNodeList [protected] |
|
XalanNode * XPathExecutionContextDefault::m_currentNode [protected] |
|
XalanDOMString XPathExecutionContextDefault::m_currentPattern [protected] |
|
DOMSupport * XPathExecutionContextDefault::m_domSupport [protected] |
|
const PrefixResolver * XPathExecutionContextDefault::m_prefixResolver [protected] |
|
bool XPathExecutionContextDefault::m_throwFoundIndex [protected] |
|
XPathEnvSupport * XPathExecutionContextDefault::m_xpathEnvSupport [protected] |
|
const NodeRefList XPathExecutionContextDefault::s_dummyList [static, protected] |
|
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.4
Copyright © 2000, 2001, 2002 The Apache Software Foundation. All Rights Reserved.
|
|