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  

StylesheetExecutionContext Class Reference

#include <StylesheetExecutionContext.hpp>

Inheritance diagram for StylesheetExecutionContext:

Inheritance graph
[legend]
Collaboration diagram for StylesheetExecutionContext:

Collaboration graph
[legend]
List of all members.

Public Types

Public Methods


Member Typedef Documentation

typedef XalanVector< TopLevelArg > StylesheetExecutionContext::ParamVectorType<TopLevelArg>
 

typedef std::ostream StylesheetExecutionContext::StreamType
 

typedef XalanMemMgrAutoPtr< XalanNumberFormat, true > StylesheetExecutionContext::XalanNumberFormatAutoPtr<XalanNumberFormat,true>
 

typedef size_t StylesheetExecutionContext::tl_size_type
 


Member Enumeration Documentation

enum StylesheetExecutionContext::eDummy
 

Enumeration values:
eDefaultXMLIndentAmount  
eDefaultHTMLIndentAmount  

enum StylesheetExecutionContext::eEscapeURLs
 

Enums to determine whether or not run-time escaping of URLs has been set.

Enumeration values:
eEscapeURLsDefault  
eEscapeURLsNo  
eEscapeURLsYes  

enum StylesheetExecutionContext::eOmitMETATag
 

Enums to determine whether or not run-time omission of the META tag has been set.

Enumeration values:
eOmitMETATagDefault  
eOmitMETATagNo  
eOmitMETATagYes  


Constructor & Destructor Documentation

StylesheetExecutionContext::StylesheetExecutionContext ( MemoryManagerType & m_memoryManager,
XObjectFactory * theXObjectFactory = 0 ) [explicit]
 

StylesheetExecutionContext::~StylesheetExecutionContext ( ) [virtual]
 


Member Function Documentation

void StylesheetExecutionContext::addResultAttribute ( const XalanDOMString & aname,
const XalanDOMChar * value ) [pure virtual]
 

Add a result attribute to the list of pending attributes.

Parameters:
aname   name of attribute
value   value of attribute

void StylesheetExecutionContext::addResultAttribute ( const XalanDOMString & aname,
const XalanDOMString & value ) [pure virtual]
 

Add a result attribute to the list of pending attributes.

Parameters:
aname   name of attribute
value   value of attribute

void StylesheetExecutionContext::beginCreateXResultTreeFrag ( XalanNode * sourceNode ) [pure virtual]
 

Initiate creation of a result tree fragment.

Parameters:
sourceNode   the source Node

void StylesheetExecutionContext::beginFormatToText ( XalanDOMString & theResult ) [pure virtual]
 

Initiate to put execution result in string.

Parameters:
theResult   the string to contain the result

void StylesheetExecutionContext::beginParams ( ) [pure virtual]
 

Initiate context to accept a new set of parameters.

MutableNodeRefList * StylesheetExecutionContext::borrowMutableNodeRefList ( ) [pure virtual]
 

Borrow a cached MutableNodeRefList instance.

Returns:
A pointer to the instance.

Reimplemented from XPathExecutionContext.

void StylesheetExecutionContext::characters ( const XObjectPtr & xobject ) [pure virtual]
 

Send character data from an XObject to the result tree.

Parameters:
node   The xobject to send.

void StylesheetExecutionContext::characters ( const XalanNode & node ) [pure virtual]
 

Send character data from a node to the result tree.

Parameters:
node   The node to send.

void StylesheetExecutionContext::characters ( const XalanDOMChar * ch,
XalanDOMString::size_type start,
XalanDOMString::size_type length ) [pure virtual]
 

Receive notification of character data.

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 StylesheetExecutionContext::charactersRaw ( const XObjectPtr & xobject ) [pure virtual]
 

Send raw character data from an XObject to the result tree.

Parameters:
node   The xobject to send.

void StylesheetExecutionContext::charactersRaw ( const XalanNode & node ) [pure virtual]
 

Send raw character data from a node to the result tree.

Parameters:
node   The node to send.
length   number of characters to read from the array

void StylesheetExecutionContext::charactersRaw ( const XalanDOMChar * ch,
XalanDOMString::size_type start,
XalanDOMString::size_type length ) [pure virtual]
 

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 StylesheetExecutionContext::clearTopLevelParams ( ) [pure virtual]
 

Reset the vector of top level parameters.

void StylesheetExecutionContext::cloneToResultTree ( const XalanNode & node,
XalanNode::NodeType nodeType,
bool overrideStrip,
bool shouldCloneAttributes,
const LocatorType * locator ) [pure virtual]
 

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
locator   The Locator, if any

void StylesheetExecutionContext::cloneToResultTree ( const XalanNode & node,
const LocatorType * locator ) [pure virtual]
 

Clone a node to the result tree.

Parameters:
node   node to clone
locator   The Locator, if any

int StylesheetExecutionContext::collationCompare ( const XalanDOMChar * theLHS,
const XalanDOMChar * theRHS,
const XalanDOMChar * theLocale,
XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault ) [pure virtual]
 

Compare two strings using the collation of the current locale.

Parameters:
theLHS   a string to compare
theRHS   a string to compare
theLocal   a string that specifies the locale
theCaseOrder   the case order for the comparison
Returns:
< 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS

int StylesheetExecutionContext::collationCompare ( const XalanDOMChar * theLHS,
const XalanDOMChar * theRHS,
XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault ) [pure virtual]
 

Compare two strings using the collation of the current locale.

Parameters:
theLHS   a string to compare
theRHS   a string to compare
theCaseOrder   the case order for the comparison
Returns:
< 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS

int StylesheetExecutionContext::collationCompare ( const XalanDOMString & theLHS,
const XalanDOMString & theRHS,
const XalanDOMString & theLocale,
XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault ) [pure virtual]
 

Compare two strings using the collation of the supplied locale.

Parameters:
theLHS   a string to compare
theRHS   a string to compare
theLocal   a string that specifies the locale
theCaseOrder   the case order for the comparison
Returns:
< 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS

int StylesheetExecutionContext::collationCompare ( const XalanDOMString & theLHS,
const XalanDOMString & theRHS,
XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault ) [pure virtual]
 

Compare two strings using the collation of the current locale.

Parameters:
theLHS   a string to compare
theRHS   a string to compare
theCaseOrder   the case order for the comparison
Returns:
< 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS

void StylesheetExecutionContext::comment ( const XalanDOMChar * data ) [pure virtual]
 

Called when a Comment is to be constructed.

Parameters:
data   pointer to comment data

void StylesheetExecutionContext::copyNamespaceAttributes ( const XalanNode & src ) [pure virtual]
 

Add namespace attributes for a node to the list of pending attributes.

Parameters:
src   source node

MutableNodeRefList & StylesheetExecutionContext::createAndPushMutableNodeRefList ( ) [pure virtual]
 

void StylesheetExecutionContext::createAndPushNodesToTransformList ( const NodeRefListBase * nodeList ) [pure virtual]
 

FormatterListener * StylesheetExecutionContext::createFormatterToHTML ( Writer & writer,
const XalanDOMString & encoding = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
const XalanDOMString & mediaType = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
const XalanDOMString & doctypeSystem = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
const XalanDOMString & doctypePublic = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
bool doIndent = true,
int indent = eDefaultHTMLIndentAmount,
bool escapeURLs = true,
bool omitMetaTag = false ) [pure virtual]
 

Create a new FormatterToHTML instance.

The execution context owns the instance and will delete it when reset.

Parameters:
writer   character output stream to use
encoding   character encoding for the writer
mediaType   media type (MIME content type) of the data
doctypeSystem   system identifier to be used in the document type declaration
doctypePublic   public identifier to be used in the document type declaration
doIndent   true if output is to be indented
indent   number of spaces to indent at each nesting level
escapeURLs   Whether or not to escape URLs according to the recommendation. The default is true.
omitMetaTag   Whether or not to output a META TAG according to the recommendation. The default is false.
Returns:
a pointer to the new instance.

FormatterListener * StylesheetExecutionContext::createFormatterToText ( Writer & writer,
const XalanDOMString & encoding ) [pure virtual]
 

FormatterToText instance constructor.

Parameters:
writer   writer for output
encoding   character encoding for the writer

FormatterListener * StylesheetExecutionContext::createFormatterToXML ( Writer & writer,
const XalanDOMString & version = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
bool doIndent = false,
int indent = eDefaultXMLIndentAmount,
const XalanDOMString & encoding = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
const XalanDOMString & mediaType = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
const XalanDOMString & doctypeSystem = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
const XalanDOMString & doctypePublic = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
bool xmlDecl = true,
const XalanDOMString & standalone = XalanDOMString(XalanMemMgrs::getDummyMemMgr()) ) [pure virtual]
 

Create a new FormatterToXML instance.

The execution context owns the instance and will delete it when reset.

Parameters:
writer   character output stream to use
version   version of the output method
doIndent   true if output is to be indented
indent   number of spaces to indent at each nesting level
encoding   character encoding for the writer
mediaType   media type (MIME content type) of the data
doctypeSystem   system identifier to be used in the document type declaration
doctypePublic   public identifier to be used in the document type declaration
xmlDecl   true if the XSLT processor should output an XML declaration
standalone   true if the XSLT processor should output a standalone document declaration
Returns:
a pointer to the new instance.

const XPath * StylesheetExecutionContext::createMatchPattern ( const XalanDOMString & str,
const PrefixResolver & resolver ) [pure virtual]
 

Create and initialize an xpath and return it.

This is to be used to create an XPath that is only used during execution.

Parameters:
str   string expression for XPath evaluation
resolver   resolver for namespace resolution
Returns:
pointer to resulting XPath

MutableNodeRefList * StylesheetExecutionContext::createMutableNodeRefList ( MemoryManagerType & theManager ) const [pure virtual]
 

Create a MutableNodeRefList with the appropriate context.

Returns:
pointer to node list created

Reimplemented from XPathExecutionContext.

PrintWriter * StylesheetExecutionContext::createPrintWriter ( FILE * theStream ) [pure virtual]
 

Create a PrintWriter using the provided FILE instance.

Parameters:
theStream   The output stream for the PrintWriter.
Returns:
The new instance.

PrintWriter * StylesheetExecutionContext::createPrintWriter ( StreamType & theStream ) [pure virtual]
 

Create a PrintWriter using the provided ostream instance.

Parameters:
theStream   The output stream for the PrintWriter.
Returns:
The new instance.

PrintWriter * StylesheetExecutionContext::createPrintWriter ( const XalanDOMString & theFileName,
const XalanDOMString & theEncoding ) [pure virtual]
 

Create a PrintWriter.

Create an appropriate output stream using the provided file name and encoding.

Parameters:
theFileName   The file name for the output stream
theEncoding   The encoding for the output stream
Returns:
The new instance.

PrintWriter * StylesheetExecutionContext::createPrintWriter ( XalanOutputStream * theTextOutputStream ) [pure virtual]
 

Create a PrintWriter for the provided stream.

Parameters:
theTextOutputStream   The output stream for the PrintWriter.
Returns:
The new instance.

void StylesheetExecutionContext::createUseAttributeSetIndexesOnStack ( ) [pure virtual]
 

const XObjectPtr StylesheetExecutionContext::createVariable ( const XPath & xpath,
XalanNode * contextNode,
const PrefixResolver & resolver ) [pure virtual]
 

Execute the supplied XPath and and create a variable in the current context.

Parameters:
str   string expression for XPath evaluation
contextNode   current node in the source tree
resolver   resolver for namespace resolution
Returns:
a pointer to the XObject result

XalanNumberFormatAutoPtr StylesheetExecutionContext::createXalanNumberFormat ( ) [pure virtual]
 

Create a new XalanNumberFormat instance.

Returns:
an XalanNumberFormatAutoPtr that owns a new XalanNumberFormat instance.

bool StylesheetExecutionContext::elementAvailable ( const XalanDOMString & theName,
const LocatorType * locator ) const [pure virtual]
 

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

Parameters:
theName   The name of the element
locator   A LocatorType instance for error reporting

Returns:
whether the given element is available or not

Reimplemented from XPathExecutionContext.

bool StylesheetExecutionContext::elementAvailable ( const XalanQName & theQName ) const [pure virtual]
 

Determine if an external element is available.

Parameters:
theQName   The QName of the element

Returns:
whether the given element is available or not

Reimplemented from XPathExecutionContext.

const XObjectPtr StylesheetExecutionContext::endCreateXResultTreeFrag ( ) [pure virtual]
 

Indicate sthe completion of result tree fragment.

Returns:
a pointer to the result tree fragment

void StylesheetExecutionContext::endDocument ( ) [pure virtual]
 

Receive notification of the end of a document.

The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

Exceptions:
SAXException  

void StylesheetExecutionContext::endElement ( const XalanDOMChar * name ) [pure virtual]
 

Receive notification of the end of an element.

Parameters:
name   element type name

void StylesheetExecutionContext::endFormatToText ( ) [pure virtual]
 

Indicates the completion of the result string.

void StylesheetExecutionContext::endParams ( ) [pure virtual]
 

Indicate parameter set is complete.

void StylesheetExecutionContext::error ( const XalanDOMString & msg,
const XalanNode * sourceNode,
const LocatorType * locator ) const [pure virtual]
 

Report an error and throw an exception.

Parameters:
msg   The text of the message.
sourceNode   The source node where the error occurred. May be 0.
locator   A Locator to determine where the error occurred. May be 0.

Reimplemented from XPathExecutionContext.

void StylesheetExecutionContext::error ( const XalanDOMString & msg,
const ElemTemplateElement & styleNode,
const XalanNode * sourceNode = 0 ) const [pure virtual]
 

Report an error and throw an exception.

Parameters:
msg   The text of the message.
styleNode   The stylesheet node were the error occurred.
sourceNode   The source node where the error occurred. May be 0.

const XObjectPtr StylesheetExecutionContext::extFunction ( const XalanDOMString & theNamespace,
const XalanDOMString & functionName,
XalanNode * context,
const XObjectArgVectorType & argVec,
const LocatorType * locator ) [pure virtual]
 

Handle an extension function.

Parameters:
</
theNamespace   namespace of function
functionName   extension function name
context   The context node