Xalan-C++ API Reference  1.12.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Static Protected Attributes | List of all members
xalanc::XPathExecutionContextDefault Class Reference

A basic implementation of the class XPathExecutionContext. More...

#include <xalanc/XPath/XPathExecutionContextDefault.hpp>

Inheritance diagram for xalanc::XPathExecutionContextDefault:
[legend]
Collaboration diagram for xalanc::XPathExecutionContextDefault:
[legend]

Classes

struct  ContextNodeListPositionCache
 

Public Types

typedef XalanVector< XalanNode * > CurrentNodeStackType
 
typedef XalanVector< const NodeRefListBase * > ContextNodeListStackType
 
- Public Types inherited from xalanc::XPathExecutionContext
typedef XalanVector< XObjectPtrXObjectArgVectorType
 
typedef NodeRefListBase::size_type size_type
 
typedef GetCachedNodeList BorrowReturnMutableNodeRefList
 
typedef GetCachedString GetAndReleaseCachedString
 
- Public Types inherited from xalanc::ProblemListenerBase
enum  eSource {
  eXMLPARSER = 0, eXMLParser = 0, eXSLPROCESSOR = 1, eXSLTProcessor = 1,
  eXPATH = 2, eXPath = 2, eSourceCount
}
 
enum  eClassification {
  eMESSAGE = 0, eMessage = 0, eWARNING = 1, eWarning = 1,
  eERROR = 2, eError = 2, eClassificationCount
}
 
typedef eSource eProblemSource
 

Public Member Functions

 XPathExecutionContextDefault (XPathEnvSupport &theXPathEnvSupport, DOMSupport &theDOMSupport, XObjectFactory &theXObjectFactory, XalanNode *theCurrentNode=0, const NodeRefListBase *theContextNodeList=0, const PrefixResolver *thePrefixResolver=0)
 Construct an XPathExecutionContextDefault object. More...
 
 XPathExecutionContextDefault (MemoryManager &theManager, XalanNode *theCurrentNode=0, const NodeRefListBase *theContextNodeList=0, const PrefixResolver *thePrefixResolver=0)
 Construct an XPathExecutionContextDefault object. More...
 
virtual ~XPathExecutionContextDefault ()
 
XPathEnvSupportgetXPathEnvSupport () const
 Get the XPathEnvSupport instance. More...
 
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...
 
XalanQNameByValuegetScratchQName () const
 Get a reference to the scratch QNameByValue instance. More...
 
virtual void doFormatNumber (double number, const XalanDOMString &pattern, const XalanDecimalFormatSymbols *theDFS, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0)
 
virtual void reset ()
 Reset the instance. More...
 
virtual XalanNodegetCurrentNode () const
 Retrieve the node currently being executed. More...
 
virtual void pushCurrentNode (XalanNode *theCurrentNode)
 Change the node currently being executed. More...
 
virtual void popCurrentNode ()
 Reset the node currently being executed. More...
 
virtual bool isNodeAfter (const XalanNode &node1, const XalanNode &node2) const
 Determine if a node is after another node, in document order. More...
 
virtual void pushContextNodeList (const NodeRefListBase &theList)
 Push the node list for current context. More...
 
virtual void popContextNodeList ()
 Pop the node list for current context. More...
 
virtual const NodeRefListBasegetContextNodeList () const
 Get the node list for current context. More...
 
virtual size_type getContextNodeListLength () const
 
virtual size_type getContextNodeListPosition (const XalanNode &contextNode) const
 
virtual bool elementAvailable (const XalanQName &theQName) const
 Determine if an external element is available. More...
 
virtual bool elementAvailable (const XalanDOMString &theName, const Locator *locator) const
 Determine if an external element is available by resolving a string to a QName. More...
 
virtual bool functionAvailable (const XalanQName &theQName) const
 Determine if a function is available. More...
 
virtual bool functionAvailable (const XalanDOMString &theName, const Locator *locator) 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 XalanDocumentparseXML (MemoryManager &theManager, const XalanDOMString &urlString, const XalanDOMString &base, ErrorHandler *theErrorHandler=0) const
 Provides support for XML parsing service. More...
 
virtual MutableNodeRefListborrowMutableNodeRefList ()
 Borrow a cached MutableNodeRefList instance. More...
 
virtual bool returnMutableNodeRefList (MutableNodeRefList *theList)
 Return a previously borrowed MutableNodeRefList instance. More...
 
virtual MutableNodeRefListcreateMutableNodeRefList (MemoryManager &theManager) const
 Create a MutableNodeRefList with the appropriate context. More...
 
virtual XalanDOMStringgetCachedString ()
 Get a cached string for temporary use. More...
 
virtual bool releaseCachedString (XalanDOMString &theString)
 Return a cached string. More...
 
virtual void getNodeSetByKey (XalanNode *context, const XalanQName &qname, const XalanDOMString &ref, const Locator *locator, MutableNodeRefList &nodelist)
 Given a valid element key, return the corresponding node list. More...
 
virtual void getNodeSetByKey (XalanNode *context, const XalanDOMString &name, const XalanDOMString &ref, const Locator *locator, 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 PrefixResolvergetPrefixResolver () const
 Retrieve the resolver for namespaces. More...
 
virtual void setPrefixResolver (const PrefixResolver *thePrefixResolver)
 Change the resolver for namespaces. More...
 
virtual const XalanDOMStringgetNamespaceForPrefix (const XalanDOMString &prefix) const
 Retrieve the URI corresponding to a namespace prefix. More...
 
virtual const XalanDOMStringfindURIFromDoc (const XalanDocument *owner) const
 Given a DOM Document, tell what URI was used to parse it. More...
 
virtual const XalanDOMStringgetUnparsedEntityURI (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 XalanDocumentgetSourceDocument (const XalanDOMString &theURI) const
 Get the document associated with the given URI. More...
 
virtual void setSourceDocument (const XalanDOMString &theURI, XalanDocument *theDocument)
 Associate a document with a given URI. More...
 
virtual void formatNumber (double number, const XalanDOMString &pattern, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0)
 Formats a number according to the specified pattern. More...
 
virtual void formatNumber (double number, const XalanDOMString &pattern, const XalanDOMString &dfsName, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0)
 Formats a number according to the specified pattern. More...
 
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 error (const XalanDOMString &msg, const XalanNode *sourceNode=0, const Locator *locator=0) const
 
virtual void warn (const XalanDOMString &msg, const XalanNode *sourceNode=0, const Locator *locator=0) const
 
virtual void message (const XalanDOMString &msg, const XalanNode *sourceNode=0, const Locator *locator=0) const
 
virtual bool shouldStripSourceNode (const XalanText &node)
 Determine if a text node should be stripped from the source tree, as if it weren't there. More...
 
- Public Member Functions inherited from xalanc::XPathExecutionContext
 XPathExecutionContext (MemoryManager &theMemoryManager, XObjectFactory *theXObjectFactory=0)
 
virtual ~XPathExecutionContext ()
 
XObjectFactorygetXObjectFactory () const
 Retrieve the factory object for creating XObjects. More...
 
- Public Member Functions inherited from xalanc::ExecutionContext
 ExecutionContext (MemoryManager &theMemoryManager)
 
virtual ~ExecutionContext ()
 
bool hasPreserveOrStripSpaceConditions () const
 
MemoryManager & getMemoryManager () const
 
MemoryManager & getExceptionMemoryManager () const
 
- Public Member Functions inherited from xalanc::ProblemListenerBase
 ProblemListenerBase ()
 
virtual ~ProblemListenerBase ()
 

Static Public Member Functions

static XPathExecutionContextDefaultcreate (MemoryManager &theManager, XalanNode *theCurrentNode=0, const NodeRefListBase *theContextNodeList=0, const PrefixResolver *thePrefixResolver=0)
 
- 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 Types

enum  { eNodeListCacheListSize = 50 }
 
typedef XalanObjectCache< MutableNodeRefList, DefaultCacheCreateFunctorMemMgr< MutableNodeRefList >, DeleteFunctor< MutableNodeRefList >, ClearCacheResetFunctor< MutableNodeRefList > > NodeListCacheType
 

Protected Attributes

XPathEnvSupportm_xpathEnvSupport
 
DOMSupportm_domSupport
 
CurrentNodeStackType m_currentNodeStack
 
ContextNodeListStackType m_contextNodeListStack
 
const PrefixResolverm_prefixResolver
 
XalanDOMString m_currentPattern
 
NodeListCacheType m_nodeListCache
 
XalanDOMStringCache m_stringCache
 
ContextNodeListPositionCache m_cachedPosition
 
XalanQNameByValue m_scratchQName
 
- Protected Attributes inherited from xalanc::XPathExecutionContext
XObjectFactorym_xobjectFactory
 
- Protected Attributes inherited from xalanc::ExecutionContext
MemoryManager & m_memoryManager
 
bool m_hasPreserveOrStripConditions
 

Static Protected Attributes

static const NodeRefList s_dummyList
 
- Static Protected Attributes inherited from xalanc::ProblemListenerBase
static const XalanMessages::Codes s_messageCodes [eSourceCount][eClassificationCount]
 

Detailed Description

A basic implementation of the class XPathExecutionContext.

Definition at line 64 of file XPathExecutionContextDefault.hpp.

Member Typedef Documentation

◆ ContextNodeListStackType

Definition at line 69 of file XPathExecutionContextDefault.hpp.

◆ CurrentNodeStackType

Definition at line 68 of file XPathExecutionContextDefault.hpp.

◆ NodeListCacheType

Definition at line 365 of file XPathExecutionContextDefault.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
eNodeListCacheListSize 

Definition at line 367 of file XPathExecutionContextDefault.hpp.

Constructor & Destructor Documentation

◆ XPathExecutionContextDefault() [1/2]

xalanc::XPathExecutionContextDefault::XPathExecutionContextDefault ( XPathEnvSupport theXPathEnvSupport,
DOMSupport theDOMSupport,
XObjectFactory theXObjectFactory,
XalanNode theCurrentNode = 0,
const NodeRefListBase theContextNodeList = 0,
const PrefixResolver thePrefixResolver = 0 
)

Construct an XPathExecutionContextDefault object.

Parameters
theXPathEnvSupportXPathEnvSupport class instance
theDOMSupportDOMSupport class instance
theXobjectFactoryfactory class instance for XObjects
theCurrentNodecurrent node in the source tree
theContextNodeListnode list for current context
thePrefixResolverpointer to prefix resolver to use

◆ XPathExecutionContextDefault() [2/2]

xalanc::XPathExecutionContextDefault::XPathExecutionContextDefault ( MemoryManager &  theManager,
XalanNode theCurrentNode = 0,
const NodeRefListBase theContextNodeList = 0,
const PrefixResolver thePrefixResolver = 0 
)
explicit

Construct an XPathExecutionContextDefault object.

Parameters
theXPathEnvSupportXPathEnvSupport class instance
theXObjectFactoryfactory class instance for XObjects
theCurrentNodecurrent node in the source tree
theContextNodeListnode list for current context
thePrefixResolverpointer to prefix resolver to use

◆ ~XPathExecutionContextDefault()

virtual xalanc::XPathExecutionContextDefault::~XPathExecutionContextDefault ( )
virtual

Member Function Documentation

◆ borrowMutableNodeRefList()

virtual MutableNodeRefList* xalanc::XPathExecutionContextDefault::borrowMutableNodeRefList ( )
virtual

Borrow a cached MutableNodeRefList instance.

Returns
A pointer to the instance.

Implements xalanc::XPathExecutionContext.

◆ create()

static XPathExecutionContextDefault* xalanc::XPathExecutionContextDefault::create ( MemoryManager &  theManager,
XalanNode theCurrentNode = 0,
const NodeRefListBase theContextNodeList = 0,
const PrefixResolver thePrefixResolver = 0 
)
static

◆ createMutableNodeRefList()

virtual MutableNodeRefList* xalanc::XPathExecutionContextDefault::createMutableNodeRefList ( MemoryManager &  theManager) const
virtual

Create a MutableNodeRefList with the appropriate context.

Returns
pointer to node list created

Implements xalanc::XPathExecutionContext.

◆ doFormatNumber()

virtual void xalanc::XPathExecutionContextDefault::doFormatNumber ( double  number,
const XalanDOMString pattern,
const XalanDecimalFormatSymbols theDFS,
XalanDOMString theResult,
const XalanNode context = 0,
const Locator *  locator = 0 
)
virtual

◆ elementAvailable() [1/2]

virtual bool xalanc::XPathExecutionContextDefault::elementAvailable ( const XalanDOMString theName,
const Locator *  locator 
) const
virtual

Determine if an external element is available by resolving a string to a QName.

Parameters
theNameThe name of the element
locatorA Locator instance for error reporting
Returns
whether the given element is available or not

Implements xalanc::XPathExecutionContext.

◆ elementAvailable() [2/2]

virtual bool xalanc::XPathExecutionContextDefault::elementAvailable ( const XalanQName theQName) const
virtual

Determine if an external element is available.

Parameters
theQNameThe QName of the element
Returns
whether the given element is available or not

Implements xalanc::XPathExecutionContext.

◆ error()

virtual void xalanc::XPathExecutionContextDefault::error ( const XalanDOMString msg,
const XalanNode sourceNode = 0,
const Locator *  locator = 0 
) const
virtual

◆ extFunction()

virtual const XObjectPtr xalanc::XPathExecutionContextDefault::extFunction ( const XalanDOMString theNamespace,
const XalanDOMString functionName,
XalanNode context,
const XObjectArgVectorType argVec,
const Locator *  locator 
)
virtual

Handle an extension function.

Parameters
theNamespacenamespace of function
functionNameextension function name
contextThe context node
argVecvector of arguments to function
locatorA Locator instance for error reporting
Returns
pointer to XObject result

Implements xalanc::XPathExecutionContext.

◆ findURIFromDoc()

virtual const XalanDOMString& xalanc::XPathExecutionContextDefault::findURIFromDoc ( const XalanDocument owner) const
virtual

Given a DOM Document, tell what URI was used to parse it.

Needed for relative resolution.

Parameters
ownersource document
Returns
document URI

Implements xalanc::XPathExecutionContext.

◆ formatNumber() [1/2]

virtual void xalanc::XPathExecutionContextDefault::formatNumber ( double  number,
const XalanDOMString pattern,
const XalanDOMString dfsName,
XalanDOMString theResult,
const XalanNode context = 0,
const Locator *  locator = 0 
)
virtual

Formats a number according to the specified pattern.

Parameters
numberthe number to be formatted
patternthe format pattern
dfsNamethe name of decimal format to use
theResultthe formatted number
contextthe source node
locatorthe locator
Returns
a pointer to the functor, 0 if none was found

Implements xalanc::XPathExecutionContext.

◆ formatNumber() [2/2]

virtual void xalanc::XPathExecutionContextDefault::formatNumber ( double  number,
const XalanDOMString pattern,
XalanDOMString theResult,
const XalanNode context = 0,
const Locator *  locator = 0 
)
virtual

Formats a number according to the specified pattern.

Parameters
numberthe number to be formatted
patternthe format pattern
theResultthe formatted number
contextthe source node
locatorthe locator

Implements xalanc::XPathExecutionContext.

◆ functionAvailable() [1/2]

virtual bool xalanc::XPathExecutionContextDefault::functionAvailable ( const XalanDOMString theName,
const Locator *  locator 
) const
virtual

Determine if a function is available.

Parameters
theNameThe name of the function
locatorA Locator instance for error reporting
Returns
whether the function is available or not

Implements xalanc::XPathExecutionContext.

◆ functionAvailable() [2/2]

virtual bool xalanc::XPathExecutionContextDefault::functionAvailable ( const XalanQName theQName) const
virtual

Determine if a function is available.

Parameters
theQNameThe QName of the function
Returns
whether the function is available or not

Implements xalanc::XPathExecutionContext.

◆ getCachedString()

virtual XalanDOMString& xalanc::XPathExecutionContextDefault::getCachedString ( )
virtual

Get a cached string for temporary use.

Returns
A reference to the string

Implements xalanc::XPathExecutionContext.

◆ getContextNodeList()

virtual const NodeRefListBase& xalanc::XPathExecutionContextDefault::getContextNodeList ( ) const
virtual

Get the node list for current context.

Returns
node list

Implements xalanc::XPathExecutionContext.

◆ getContextNodeListLength()

virtual size_type xalanc::XPathExecutionContextDefault::getContextNodeListLength ( ) const
virtual

◆ getContextNodeListPosition()

virtual size_type xalanc::XPathExecutionContextDefault::getContextNodeListPosition ( const XalanNode contextNode) const
virtual

◆ getCurrentNode()

virtual XalanNode* xalanc::XPathExecutionContextDefault::getCurrentNode ( ) const
virtual

Retrieve the node currently being executed.

Returns
current node

Implements xalanc::XPathExecutionContext.

◆ getNamespaceForPrefix()

virtual const XalanDOMString* xalanc::XPathExecutionContextDefault::getNamespaceForPrefix ( const XalanDOMString prefix) const
virtual

Retrieve the URI corresponding to a namespace prefix.

Parameters
prefixprefix for a namespace
Returns
URI corresponding to namespace

Implements xalanc::XPathExecutionContext.

◆ getNodeSetByKey() [1/2]

virtual void xalanc::XPathExecutionContextDefault::getNodeSetByKey ( XalanNode context,
const XalanDOMString name,
const XalanDOMString ref,
const Locator *  locator,
MutableNodeRefList nodelist 
)
virtual

Given a valid element key, return the corresponding node list.

Parameters
contextcontext node
namename of the key, which must match the 'name' attribute on xsl:key. Will be resolved to a qname using the provided resolver.
refvalue that must match the value found by the 'match' attribute on xsl:key
locatorThe Locator to use for error reporting. Can be 0.
nodelistA node list to contain the nodes found

Implements xalanc::XPathExecutionContext.

◆ getNodeSetByKey() [2/2]

virtual void xalanc::XPathExecutionContextDefault::getNodeSetByKey ( XalanNode context,
const XalanQName qname,
const XalanDOMString ref,
const Locator *  locator,
MutableNodeRefList nodelist 
)
virtual

Given a valid element key, return the corresponding node list.

Parameters
contextcontext node
nameqname of the key, which must match the 'name' attribute on xsl:key
refvalue that must match the value found by the 'match' attribute on xsl:key
locatorThe Locator to use for error reporting. Can be 0.
nodelistA node list to contain the nodes found

Implements xalanc::XPathExecutionContext.

◆ getPrefixResolver()

virtual const PrefixResolver* xalanc::XPathExecutionContextDefault::getPrefixResolver ( ) const
virtual

Retrieve the resolver for namespaces.

Returns
object for namespace resolution

Implements xalanc::XPathExecutionContext.

◆ getScratchQName()

XalanQNameByValue& xalanc::XPathExecutionContextDefault::getScratchQName ( ) const
inline

Get a reference to the scratch QNameByValue instance.

Returns
A reference to a QNameByValue instance.

Definition at line 166 of file XPathExecutionContextDefault.hpp.

◆ getSourceDocument()

virtual XalanDocument* xalanc::XPathExecutionContextDefault::getSourceDocument ( const XalanDOMString theURI) const
virtual

Get the document associated with the given URI.

Parameters
theURIdocument URI
Returns
a pointer to the document instance, if any.

Implements xalanc::XPathExecutionContext.

◆ getUnparsedEntityURI()

virtual const XalanDOMString& xalanc::XPathExecutionContextDefault::getUnparsedEntityURI ( const XalanDOMString theName,
const XalanDocument theDocument 
) 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
theNamename of entity
theDocumentdocument containing entity
Returns
URI for the entity

Implements xalanc::XPathExecutionContext.

◆ getVariable()

virtual const XObjectPtr xalanc::XPathExecutionContextDefault::getVariable ( const XalanQName name,
const Locator *  locator = 0 
)
virtual

Given a name, locate a variable in the current context, and return a pointer to the object.

Parameters
theNamename of variable
Returns
An XObjectPtr instance. If the variable is not found, an exception is thrown, or the routine returns an instance of XUnknown.

Implements xalanc::XPathExecutionContext.

◆ getXPathEnvSupport()

XPathEnvSupport* xalanc::XPathExecutionContextDefault::getXPathEnvSupport ( ) const
inline

Get the XPathEnvSupport instance.

Returns
a pointer to the instance.

Definition at line 122 of file XPathExecutionContextDefault.hpp.

◆ isNodeAfter()

virtual bool xalanc::XPathExecutionContextDefault::isNodeAfter ( const XalanNode node1,
const XalanNode node2 
) const
virtual

Determine if a node is after another node, in document order.

Parameters
node1The first node
node2The second node
Returns
true if node1 one is after node2, or false if it is not.

Implements xalanc::XPathExecutionContext.

◆ message()

virtual void xalanc::XPathExecutionContextDefault::message ( const XalanDOMString msg,
const XalanNode sourceNode = 0,
const Locator *  locator = 0 
) const
virtual

◆ parseXML()

virtual XalanDocument* xalanc::XPathExecutionContextDefault::parseXML ( MemoryManager &  theManager,
const XalanDOMString urlString,
const XalanDOMString base,
ErrorHandler *  theErrorHandler = 0 
) const
virtual

Provides support for XML parsing service.

Parameters
theManagerThe MemoryManager instance to use.
urlStringlocation of the XML
basebase location for URI
theErrorHandlerAn optional ErrorHandler instance for error reporting.
Returns
parsed document

Implements xalanc::XPathExecutionContext.

◆ popContextNodeList()

virtual void xalanc::XPathExecutionContextDefault::popContextNodeList ( )
virtual

Pop the node list for current context.

Implements xalanc::XPathExecutionContext.

◆ popCurrentNode()

virtual void xalanc::XPathExecutionContextDefault::popCurrentNode ( )
virtual

Reset the node currently being executed.

Implements xalanc::XPathExecutionContext.

◆ problem() [1/2]

virtual void xalanc::XPathExecutionContextDefault::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const Locator *  locator,
const XalanNode sourceNode 
)
virtual

Function that is called when a problem event occurs.

Parameters
sourceEither eXMLParser, eXSLProcessor, or eXPATH.
classificationEither eMessage, eWarning, or eError.
locatorThe current Locator instance for the stylesheet. Maybe be a null pointer.
sourceNodeThe current source node, if any.
msgThe error message.

Implements xalanc::XPathExecutionContext.

◆ problem() [2/2]

virtual void xalanc::XPathExecutionContextDefault::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const XalanNode sourceNode 
)
virtual

Function that is called when a problem event occurs.

This version assumes location information is already formatted into the message.

Parameters
sourceeither eXMLPARSER, eXSLPROCESSOR, or eXPATH
classificationeither eMESSAGE, eERROR or eWARNING
msgstring message explaining the problem.

Implements xalanc::XPathExecutionContext.

◆ pushContextNodeList()

virtual void xalanc::XPathExecutionContextDefault::pushContextNodeList ( const NodeRefListBase theList)
virtual

Push the node list for current context.

Parameters
theListnew node list

Implements xalanc::XPathExecutionContext.

◆ pushCurrentNode()

virtual void xalanc::XPathExecutionContextDefault::pushCurrentNode ( XalanNode theCurrentNode)
virtual

Change the node currently being executed.

Parameters
theCurrentNodenew current node

Implements xalanc::XPathExecutionContext.

◆ releaseCachedString()

virtual bool xalanc::XPathExecutionContextDefault::releaseCachedString ( XalanDOMString theString)
virtual

Return a cached string.

Parameters
theStringThe string to release.
Returns
true if the string was released successfully.

Implements xalanc::XPathExecutionContext.

◆ reset()

virtual void xalanc::XPathExecutionContextDefault::reset ( )
virtual

Reset the instance.

This must be called before another execution is attempted.

Implements xalanc::XPathExecutionContext.

◆ returnMutableNodeRefList()

virtual bool xalanc::XPathExecutionContextDefault::returnMutableNodeRefList ( MutableNodeRefList theList)
virtual

Return a previously borrowed MutableNodeRefList instance.

Parameters
theListA pointer the to previously borrowed instance.
Returns
true if the list was borrowed (at therefore, destroyed), false if not.

Implements xalanc::XPathExecutionContext.

◆ setDOMSupport()

void xalanc::XPathExecutionContextDefault::setDOMSupport ( DOMSupport theDOMSupport)
inline

Set the DOMSupport instance.

Parameters
theDOMSupporta reference to the instance to use.

Definition at line 144 of file XPathExecutionContextDefault.hpp.

◆ setPrefixResolver()

virtual void xalanc::XPathExecutionContextDefault::setPrefixResolver ( const PrefixResolver thePrefixResolver)
virtual

Change the resolver for namespaces.

Parameters
thePrefixResolvernew object for namespace resolution

Implements xalanc::XPathExecutionContext.

◆ setSourceDocument()

virtual void xalanc::XPathExecutionContextDefault::setSourceDocument ( const XalanDOMString theURI,
XalanDocument theDocument 
)
virtual

Associate a document with a given URI.

Parameters
theURIdocument URI
theDocumentsource document

Implements xalanc::XPathExecutionContext.

◆ setXObjectFactory()

void xalanc::XPathExecutionContextDefault::setXObjectFactory ( XObjectFactory theXObjectFactory)
inline

Set the XObjectFactory instance.

Parameters
theFactorya reference to the instance to use.

Definition at line 155 of file XPathExecutionContextDefault.hpp.

◆ setXPathEnvSupport()

void xalanc::XPathExecutionContextDefault::setXPathEnvSupport ( XPathEnvSupport theSupport)
inline

Set the XPathEnvSupport instance.

Parameters
theSupporta reference to the instance to use.

Definition at line 133 of file XPathExecutionContextDefault.hpp.

◆ shouldStripSourceNode()

virtual bool xalanc::XPathExecutionContextDefault::shouldStripSourceNode ( const XalanText node)
virtual

Determine if a text node should be stripped from the source tree, as if it weren't there.

Parameters
textNodetext node from the source tree
Returns
true if the text node should be stripped

Implements xalanc::XPathExecutionContext.

◆ warn()

virtual void xalanc::XPathExecutionContextDefault::warn ( const XalanDOMString msg,
const XalanNode sourceNode = 0,
const Locator *  locator = 0 
) const
virtual

Member Data Documentation

◆ m_cachedPosition

ContextNodeListPositionCache xalanc::XPathExecutionContextDefault::m_cachedPosition
mutableprotected

Definition at line 407 of file XPathExecutionContextDefault.hpp.

◆ m_contextNodeListStack

ContextNodeListStackType xalanc::XPathExecutionContextDefault::m_contextNodeListStack
protected

Definition at line 397 of file XPathExecutionContextDefault.hpp.

◆ m_currentNodeStack

CurrentNodeStackType xalanc::XPathExecutionContextDefault::m_currentNodeStack
protected

Definition at line 395 of file XPathExecutionContextDefault.hpp.

◆ m_currentPattern

XalanDOMString xalanc::XPathExecutionContextDefault::m_currentPattern
protected

Definition at line 401 of file XPathExecutionContextDefault.hpp.

◆ m_domSupport

DOMSupport* xalanc::XPathExecutionContextDefault::m_domSupport
protected

Definition at line 393 of file XPathExecutionContextDefault.hpp.

◆ m_nodeListCache

NodeListCacheType xalanc::XPathExecutionContextDefault::m_nodeListCache
protected

Definition at line 403 of file XPathExecutionContextDefault.hpp.

◆ m_prefixResolver

const PrefixResolver* xalanc::XPathExecutionContextDefault::m_prefixResolver
protected

Definition at line 399 of file XPathExecutionContextDefault.hpp.

◆ m_scratchQName

XalanQNameByValue xalanc::XPathExecutionContextDefault::m_scratchQName
mutableprotected

Definition at line 409 of file XPathExecutionContextDefault.hpp.

◆ m_stringCache

XalanDOMStringCache xalanc::XPathExecutionContextDefault::m_stringCache
protected

Definition at line 405 of file XPathExecutionContextDefault.hpp.

◆ m_xpathEnvSupport

XPathEnvSupport* xalanc::XPathExecutionContextDefault::m_xpathEnvSupport
protected

Definition at line 391 of file XPathExecutionContextDefault.hpp.

◆ s_dummyList

const NodeRefList xalanc::XPathExecutionContextDefault::s_dummyList
staticprotected

Definition at line 411 of file XPathExecutionContextDefault.hpp.


The documentation for this class was generated from the following file: