Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Static Protected Attributes

XPathExecutionContextDefault Class Reference

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

#include <XPathExecutionContextDefault.hpp>

Inherits XPathExecutionContext.

Collaboration diagram for XPathExecutionContextDefault:
Collaboration graph
[legend]

List of all members.

Classes

Public Types

Public Member Functions

Static Public Member Functions

Protected Types

Protected Attributes

Static Protected Attributes


Detailed Description

A basic implementation of the class XPathExecutionContext.

Definition at line 64 of file XPathExecutionContextDefault.hpp.


Member Typedef Documentation

Definition at line 69 of file XPathExecutionContextDefault.hpp.

Definition at line 68 of file XPathExecutionContextDefault.hpp.

Definition at line 365 of file XPathExecutionContextDefault.hpp.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
eNodeListCacheListSize 

Definition at line 367 of file XPathExecutionContextDefault.hpp.


Constructor & Destructor Documentation

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

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
XPathExecutionContextDefault::XPathExecutionContextDefault ( MemoryManager &  theManager,
XalanNode theCurrentNode = 0,
const NodeRefListBase theContextNodeList = 0,
const PrefixResolver thePrefixResolver = 0 
) [explicit]

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]

Borrow a cached MutableNodeRefList instance.

Returns:
A pointer to the instance.

Implements XPathExecutionContext.

static XPathExecutionContextDefault* XPathExecutionContextDefault::create ( MemoryManager &  theManager,
XalanNode theCurrentNode = 0,
const NodeRefListBase theContextNodeList = 0,
const PrefixResolver thePrefixResolver = 0 
) [static]
virtual MutableNodeRefList* XPathExecutionContextDefault::createMutableNodeRefList ( MemoryManager &  theManager  )  const [virtual]

Create a MutableNodeRefList with the appropriate context.

Returns:
pointer to node list created

Implements XPathExecutionContext.

virtual void XPathExecutionContextDefault::doFormatNumber ( double  number,
const XalanDOMString pattern,
const XalanDecimalFormatSymbols theDFS,
XalanDOMString theResult,
const XalanNode context = 0,
const Locator *  locator = 0 
) [virtual]
virtual bool XPathExecutionContextDefault::elementAvailable ( const XalanQName theQName  )  const [virtual]

Determine if an external element is available.

Parameters:
theQName The QName of the element
Returns:
whether the given element is available or not

Implements XPathExecutionContext.

virtual bool 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:
theName The name of the element
locator A Locator instance for error reporting
Returns:
whether the given element is available or not

Implements XPathExecutionContext.

virtual void XPathExecutionContextDefault::error ( const XalanDOMString msg,
const XalanNode sourceNode = 0,
const Locator *  locator = 0 
) const [virtual]
virtual const XObjectPtr XPathExecutionContextDefault::extFunction ( const XalanDOMString theNamespace,
const XalanDOMString functionName,
XalanNode context,
const XObjectArgVectorType argVec,
const Locator *  locator 
) [virtual]

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

Implements XPathExecutionContext.

virtual const XalanDOMString& XPathExecutionContextDefault::findURIFromDoc ( const XalanDocument owner  )  const [virtual]

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

Needed for relative resolution.

Parameters:
owner source document
Returns:
document URI

Implements XPathExecutionContext.

virtual void 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:
number the number to be formatted
pattern the format pattern
theResult the formatted number
context the source node
locator the locator

Implements XPathExecutionContext.

virtual void 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:
number the number to be formatted
pattern the format pattern
dfsName the name of decimal format to use
theResult the formatted number
context the source node
locator the locator
Returns:
a pointer to the functor, 0 if none was found

Implements XPathExecutionContext.

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

Determine if a function is available.

Parameters:
theName The name of the function
locator A Locator instance for error reporting
Returns:
whether the function is available or not

Implements XPathExecutionContext.

virtual bool XPathExecutionContextDefault::functionAvailable ( const XalanQName theQName  )  const [virtual]

Determine if a function is available.

Parameters:
theQName The QName of the function
Returns:
whether the function is available or not

Implements XPathExecutionContext.

virtual XalanDOMString& XPathExecutionContextDefault::getCachedString (  )  [virtual]

Get a cached string for temporary use.

Returns:
A reference to the string

Implements XPathExecutionContext.

virtual const NodeRefListBase& XPathExecutionContextDefault::getContextNodeList (  )  const [virtual]

Get the node list for current context.

Returns:
node list

Implements XPathExecutionContext.

virtual size_type XPathExecutionContextDefault::getContextNodeListLength (  )  const [virtual]

Implements XPathExecutionContext.

virtual size_type XPathExecutionContextDefault::getContextNodeListPosition ( const XalanNode contextNode  )  const [virtual]

Implements XPathExecutionContext.

virtual XalanNode* XPathExecutionContextDefault::getCurrentNode (  )  const [virtual]

Retrieve the node currently being executed.

Returns:
current node

Implements XPathExecutionContext.

virtual const XalanDOMString* XPathExecutionContextDefault::getNamespaceForPrefix ( const XalanDOMString prefix  )  const [virtual]

Retrieve the URI corresponding to a namespace prefix.

Parameters:
prefix prefix for a namespace
Returns:
URI corresponding to namespace

Implements XPathExecutionContext.

virtual void 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:
context context node
name qname 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
locator The Locator to use for error reporting. Can be 0.
nodelist A node list to contain the nodes found

Implements XPathExecutionContext.

virtual void 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:
context context node
name name of the key, which must match the 'name' attribute on xsl:key. Will be resolved to a qname using the provided resolver.
ref value that must match the value found by the 'match' attribute on xsl:key
locator The Locator to use for error reporting. Can be 0.
nodelist A node list to contain the nodes found

Implements XPathExecutionContext.

virtual const PrefixResolver* XPathExecutionContextDefault::getPrefixResolver (  )  const [virtual]

Retrieve the resolver for namespaces.

Returns:
object for namespace resolution

Implements XPathExecutionContext.

XalanQNameByValue& 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.

virtual XalanDocument* XPathExecutionContextDefault::getSourceDocument ( const XalanDOMString theURI  )  const [virtual]

Get the document associated with the given URI.

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

Implements XPathExecutionContext.

virtual const XalanDOMString& 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:
theName name of entity
theDocument document containing entity
Returns:
URI for the entity

Implements XPathExecutionContext.

virtual const XObjectPtr 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:
theName name 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 XPathExecutionContext.

XPathEnvSupport* XPathExecutionContextDefault::getXPathEnvSupport (  )  const [inline]

Get the XPathEnvSupport instance.

Returns:
a pointer to the instance.

Definition at line 122 of file XPathExecutionContextDefault.hpp.

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.

Implements XPathExecutionContext.

virtual void XPathExecutionContextDefault::message ( const XalanDOMString msg,
const XalanNode sourceNode = 0,
const Locator *  locator = 0 
) const [virtual]
virtual XalanDocument* XPathExecutionContextDefault::parseXML ( MemoryManager &  theManager,
const XalanDOMString urlString,
const XalanDOMString base,
ErrorHandler *  theErrorHandler = 0 
) const [virtual]

Provides support for XML parsing service.

Parameters:
theManager The MemoryManager instance to use.
urlString location of the XML
base base location for URI
theErrorHandler An optional ErrorHandler instance for error reporting.
Returns:
parsed document

Implements XPathExecutionContext.

virtual void XPathExecutionContextDefault::popContextNodeList (  )  [virtual]

Pop the node list for current context.

Implements XPathExecutionContext.

virtual void XPathExecutionContextDefault::popCurrentNode (  )  [virtual]

Reset the node currently being executed.

Implements XPathExecutionContext.

virtual void 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:
source Either eXMLParser, eXSLProcessor, or eXPATH.
classification Either eMessage, eWarning, or eError.
locator The current Locator instance for the stylesheet. Maybe be a null pointer.
sourceNode The current source node, if any.
msg The error message.

Implements XPathExecutionContext.

virtual void 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:
source either eXMLPARSER, eXSLPROCESSOR, or eXPATH
classification either eMESSAGE, eERROR or eWARNING
msg string message explaining the problem.

Implements XPathExecutionContext.

virtual void XPathExecutionContextDefault::pushContextNodeList ( const NodeRefListBase theList  )  [virtual]

Push the node list for current context.

Parameters:
theList new node list

Implements XPathExecutionContext.

virtual void XPathExecutionContextDefault::pushCurrentNode ( XalanNode theCurrentNode  )  [virtual]

Change the node currently being executed.

Parameters:
theCurrentNode new current node

Implements XPathExecutionContext.

virtual bool XPathExecutionContextDefault::releaseCachedString ( XalanDOMString theString  )  [virtual]

Return a cached string.

Parameters:
theString The string to release.
Returns:
true if the string was released successfully.

Implements XPathExecutionContext.

virtual void XPathExecutionContextDefault::reset (  )  [virtual]

Reset the instance.

This must be called before another execution is attempted.

Implements 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.

Implements XPathExecutionContext.

void XPathExecutionContextDefault::setDOMSupport ( DOMSupport theDOMSupport  )  [inline]

Set the DOMSupport instance.

Parameters:
theDOMSupport a reference to the instance to use.

Definition at line 144 of file XPathExecutionContextDefault.hpp.

virtual void XPathExecutionContextDefault::setPrefixResolver ( const PrefixResolver thePrefixResolver  )  [virtual]

Change the resolver for namespaces.

Parameters:
thePrefixResolver new object for namespace resolution

Implements XPathExecutionContext.

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

Associate a document with a given URI.

Parameters:
theURI document URI
theDocument source document

Implements XPathExecutionContext.

void XPathExecutionContextDefault::setXObjectFactory ( XObjectFactory theXObjectFactory  )  [inline]

Set the XObjectFactory instance.

Parameters:
theFactory a reference to the instance to use.

Definition at line 155 of file XPathExecutionContextDefault.hpp.

void XPathExecutionContextDefault::setXPathEnvSupport ( XPathEnvSupport theSupport  )  [inline]

Set the XPathEnvSupport instance.

Parameters:
theSupport a reference to the instance to use.

Definition at line 133 of file XPathExecutionContextDefault.hpp.

virtual bool 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:
textNode text node from the source tree
Returns:
true if the text node should be stripped

Implements XPathExecutionContext.

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

Member Data Documentation

Definition at line 407 of file XPathExecutionContextDefault.hpp.

Definition at line 397 of file XPathExecutionContextDefault.hpp.

Definition at line 395 of file XPathExecutionContextDefault.hpp.

Definition at line 401 of file XPathExecutionContextDefault.hpp.

Definition at line 393 of file XPathExecutionContextDefault.hpp.

Definition at line 403 of file XPathExecutionContextDefault.hpp.

Definition at line 399 of file XPathExecutionContextDefault.hpp.

Definition at line 409 of file XPathExecutionContextDefault.hpp.

Definition at line 405 of file XPathExecutionContextDefault.hpp.

Definition at line 391 of file XPathExecutionContextDefault.hpp.

Definition at line 411 of file XPathExecutionContextDefault.hpp.


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.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo