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

#include <xalanc/XSLT/ElemTemplateElement.hpp>

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

Classes

class  LocatorProxy
 

Public Member Functions

 ElemTemplateElement (StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, XalanFileLoc lineNumber, XalanFileLoc columnNumber, int xslToken)
 Construct a template element instance. More...
 
 ElemTemplateElement (StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, int xslToken, const XalanDOMString &baseURI=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), XalanFileLoc lineNumber=XalanLocator::getUnknownValue(), XalanFileLoc columnNumber=XalanLocator::getUnknownValue())
 Special constructor used by dummy elements which do not exist in the final stylesheet. More...
 
virtual ~ElemTemplateElement ()
 
virtual const Locator * getLocator () const
 Get the Locator for the node. More...
 
virtual bool isAttrOK (const XalanDOMChar *attrName, const AttributeListType &atts, XalanSize_t which, StylesheetConstructionContext &constructionContext) const
 See if this is a xmlns attribute or in a non-XSLT. More...
 
bool processSpaceAttr (const XalanDOMChar *elementName, const XalanDOMChar *aname, const AttributeListType &atts, XalanSize_t which, StylesheetConstructionContext &constructionContext)
 Tell whether or not this is a xml:space attribute and, if so, process it. More...
 
virtual const ElemTemplateElementstartElement (StylesheetExecutionContext &executionContext) const
 Completes "pre-processing" before any sub-elements are invoked (i.e. More...
 
virtual void endElement (StylesheetExecutionContext &executionContext) const
 Completes "post-processing" afer any sub-elements are invoked (i.e. More...
 
virtual void execute (StylesheetExecutionContext &executionContext) const
 Execute the element. More...
 
virtual void executeChildren (StylesheetExecutionContext &executionContext) const
 Execute the children of this element. More...
 
virtual const ElemTemplateElementgetInvoker (StylesheetExecutionContext &executionContext) const
 Returns the element that invoked this element. More...
 
int getXSLToken () const
 
virtual bool isWhitespace () const
 Tell if the element will generate text which is XML whitespace. More...
 
virtual const XalanDOMStringgetElementName () const =0
 Get a string for the name of the element. More...
 
virtual const XalanQNamegetNameAttribute () const
 Get the QName associated with any name attribute of this element. More...
 
virtual void addToStylesheet (StylesheetConstructionContext &constructionContext, Stylesheet &theStylesheet)
 Called during compilation when an instance is not parented by another element, and thus, is a child of the stylesheet. More...
 
virtual void processSortElement (StylesheetConstructionContext &constructionContext, Stylesheet &theStylesheet, const AttributeListType &atts, const Locator *locator=0)
 Called during compilation to process xsl:sort elements in the stylesheet. More...
 
virtual void setDefaultTemplate (bool value)
 Sets a flag indicating this is the default template. More...
 
const NamespacesHandlergetNamespacesHandler () const
 Get the namespaces handler for this element. More...
 
const StylesheetgetStylesheet () const
 Retrieve the stylesheet from which this element comes. More...
 
void setFinishedConstruction (bool fValue)
 Set the flag indicating construction of the element is completed. More...
 
bool getFinishedConstruction () const
 Get the flag indicating construction of the element is completed. More...
 
virtual void postConstruction (StylesheetConstructionContext &constructionContext, const NamespacesHandler &theParentHandler)
 Called after construction is completed. More...
 
virtual ElemTemplateElementgetFirstChildElem () const
 Get the first child. More...
 
virtual const ElemTemplateElementbeginExecuteChildren (StylesheetExecutionContext &executionContext) const
 Method to initiate the execution of the element's children. More...
 
virtual void endExecuteChildren (StylesheetExecutionContext &executionContext) const
 Method to indicate the execution of the element's children is complete. More...
 
const ElemTemplateElementbeginChildrenToString (StylesheetExecutionContext &executionContext, XalanDOMString &result) const
 Method to initiate output from the children to a string. More...
 
void endChildrenToString (StylesheetExecutionContext &executionContext) const
 Method to indicate string output from the children is complete. More...
 
virtual void setFirstChildElem (ElemTemplateElement *theChild)
 Set the first child. More...
 
virtual ElemTemplateElementgetLastChildElem () const
 Get the last child. More...
 
virtual ElemTemplateElementgetNextSiblingElem () const
 Get the next sibling. More...
 
virtual const ElemTemplateElementgetNextChildElemToExecute (StylesheetExecutionContext &executionContext, const ElemTemplateElement *currentElem) const
 Returns the next sub-element (i.e. More...
 
virtual const ElemTemplateElementgetFirstChildElemToExecute (StylesheetExecutionContext &executionContext) const
 Returns the first sub-element (i.e. More...
 
virtual bool executeChildElement (StylesheetExecutionContext &executionContext, const ElemTemplateElement *element) const
 Filters sub-elements that should be executed. More...
 
virtual void setNextSiblingElem (ElemTemplateElement *theSibling)
 Set the next sibling. More...
 
virtual ElemTemplateElementgetPreviousSiblingElem () const
 Get the previous sibling. More...
 
virtual void setPreviousSiblingElem (ElemTemplateElement *theSibling)
 Set the previous sibling. More...
 
virtual ElemTemplateElementgetParentNodeElem () const
 Get the parent node. More...
 
virtual void setParentNodeElem (ElemTemplateElement *theParent)
 Set the parent node. More...
 
virtual ElemTemplateElementappendChildElem (ElemTemplateElement *newChild)
 Append a child. More...
 
virtual const XPathgetXPath (XalanSize_t index) const
 Get XPath pattern/expression of one of the element atribute. More...
 
virtual const XalanDOMStringgetNamespaceForPrefix (const XalanDOMString &prefix) const
 Retrieve a namespace corresponding to a prefix. More...
 
virtual const XalanDOMStringgetURI () const
 Retrieve the base URI for the resolver. More...
 
XalanFileLoc getLineNumber () const
 
XalanFileLoc getColumnNumber () const
 
bool hasParams () const
 
bool hasVariables () const
 
bool hasSingleTextChild () const
 
bool hasChildren () const
 
bool hasDirectTemplate () const
 
bool canGenerateAttributes () const
 
bool isDefaultTemplate () const
 
- Public Member Functions inherited from xalanc::PrefixResolver
 PrefixResolver ()
 
 PrefixResolver (const PrefixResolver &)
 
virtual ~PrefixResolver ()
 

Static Public Member Functions

static bool isValidNCName (const XalanDOMString &s)
 Validate that the string is an NCName. More...
 

Protected Member Functions

void canGenerateAttributes (bool value)
 
void hasPrefix (bool value)
 
bool hasPrefix () const
 
void preserveSpace (bool value)
 
bool preserveSpace () const
 
void disableOutputEscaping (bool value)
 
bool disableOutputEscaping () const
 
bool processPrefixControl (StylesheetConstructionContext &constructionContext, const Stylesheet &stylesheetTree, const XalanDOMString &localName, const XalanDOMChar *attrValue)
 Process the exclude-result-prefixes or the extension-element-prefixes attributes, for the purpose of prefix exclusion. More...
 
const XalanDOMStringgetNamespaceForPrefixInternal (const XalanDOMString &prefix) const
 Get the namespace for a given prefix. More...
 
virtual const ElemTemplateElementfindTemplateToTransformChild (StylesheetExecutionContext &executionContext, const ElemTemplateElement &xslInstruction, const ElemTemplateElement *theTemplate, XalanNode *child) const
 Given an element, find the corresponding template. More...
 
virtual const ElemTemplateElementfindTemplateToTransformChild (StylesheetExecutionContext &executionContext, const ElemTemplateElement &xslInstruction, const ElemTemplateElement *theTemplate, XalanNode *child, XalanNode::NodeType nodeType) const
 Given an element, find the corresponding template. More...
 
virtual bool childTypeAllowed (int xslToken) const
 Given an xsl token type, determine whether or not a child of that type is allowed. More...
 
virtual void namespacesPostConstruction (StylesheetConstructionContext &constructionContext, const NamespacesHandler &theParentHandler, NamespacesHandler &theHandler)
 Called after construction is completed. More...
 
const NamespacesHandlergetNamespaces () const
 
void error (StylesheetExecutionContext &theContext, XalanMessages::Codes theCode) const
 A convenience function for loading a message and reporting an error through the provided StylesheetExecutionContext instance. More...
 
void error (StylesheetExecutionContext &theContext, XalanMessages::Codes theCode, const XalanDOMString &theToken) const
 A convenience function for loading a message and reporting an error through the provided StylesheetExecutionContext instance. More...
 
void error (StylesheetExecutionContext &theContext, XalanMessages::Codes theCode, const Locator *theLocator) const
 A convenience function for loading a message and reporting an error through the provided StylesheetExecutionContext instance. More...
 
void warn (StylesheetExecutionContext &theContext, XalanMessages::Codes theCode) const
 A convenience function for loading a message and reporting a warning through the provided StylesheetExecutionContext instance. More...
 
void warn (StylesheetExecutionContext &theContext, XalanMessages::Codes theCode, const XalanDOMString &theToken) const
 A convenience function for loading a message and reporting a warning through the provided StylesheetExecutionContext instance. More...
 
void warn (StylesheetExecutionContext &theContext, XalanMessages::Codes theCode, const Locator *theLocator) const
 A convenience function for loading a message and reporting a warning through the provided StylesheetExecutionContext instance. More...
 
void error (StylesheetConstructionContext &theContext, XalanMessages::Codes theCode)
 A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance. More...
 
void error (StylesheetConstructionContext &theContext, XalanMessages::Codes theCode, const XalanDOMString &theToken)
 A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance. More...
 
void error (StylesheetConstructionContext &theContext, XalanMessages::Codes theCode, const XalanDOMString &theToken, const Locator *theLocator)
 A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance. More...
 
void error (StylesheetConstructionContext &theContext, XalanMessages::Codes theCode, const XalanDOMString &theToken1, const XalanDOMString &theToken2)
 A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance. More...
 
void error (StylesheetConstructionContext &theContext, XalanMessages::Codes theCode, const XalanDOMChar *theToken1, const XalanDOMChar *theToken2)
 A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance. More...
 
void error (StylesheetConstructionContext &theContext, XalanMessages::Codes theCode, const XalanDOMChar *theToken1, const XalanDOMChar *theToken2, const XalanDOMChar *theToken3)
 A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance. More...
 
void warn (StylesheetConstructionContext &theContext, XalanMessages::Codes theCode, const XalanDOMChar *theToken1, const XalanDOMChar *theToken2, const XalanDOMChar *theToken3)
 A convenience function for loading a message and reporting a warning through the provided StylesheetConstructionContext instance. More...
 

Static Protected Attributes

static const XalanDOMString s_emptyString
 

Detailed Description

Definition at line 79 of file ElemTemplateElement.hpp.

Constructor & Destructor Documentation

◆ ElemTemplateElement() [1/2]

xalanc::ElemTemplateElement::ElemTemplateElement ( StylesheetConstructionContext constructionContext,
Stylesheet stylesheetTree,
XalanFileLoc  lineNumber,
XalanFileLoc  columnNumber,
int  xslToken 
)

Construct a template element instance.

Parameters
constructionContextcontext when object constructed
stylesheetTreeowning stylesheet
lineNumberline in the XSLT file where the element occurs
columnNumbercolumn index in the XSLT file where the element occurs
xslTokenan integer representing the type of instance.

◆ ElemTemplateElement() [2/2]

xalanc::ElemTemplateElement::ElemTemplateElement ( StylesheetConstructionContext constructionContext,
Stylesheet stylesheetTree,
int  xslToken,
const XalanDOMString baseURI = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
XalanFileLoc  lineNumber = XalanLocator::getUnknownValue(),
XalanFileLoc  columnNumber = XalanLocator::getUnknownValue() 
)

Special constructor used by dummy elements which do not exist in the final stylesheet.

Parameters
constructionContextcontext when object constructed
stylesheetTreeowning stylesheet
baseURIThe base URI of the XSLT file where the element occurs.
lineNumberline in the XSLT file where the element occurs
columnNumbercolumn index in the XSLT file where the element occurs
xslTokenan integer representing the type of instance.

◆ ~ElemTemplateElement()

virtual xalanc::ElemTemplateElement::~ElemTemplateElement ( )
virtual

Member Function Documentation

◆ addToStylesheet()

virtual void xalanc::ElemTemplateElement::addToStylesheet ( StylesheetConstructionContext constructionContext,
Stylesheet theStylesheet 
)
virtual

Called during compilation when an instance is not parented by another element, and thus, is a child of the stylesheet.

Parameters
constructionContextThe current construction context
theStylesheetThe owning stylesheet
Returns
nothing

Reimplemented in xalanc::ElemTemplate, xalanc::ElemAttributeSet, and xalanc::ElemVariable.

◆ appendChildElem()

virtual ElemTemplateElement* xalanc::ElemTemplateElement::appendChildElem ( ElemTemplateElement newChild)
virtual

Append a child.

theParent - the new value for the parent.

Returns
nothing

Reimplemented in xalanc::ElemApplyImport.

◆ beginChildrenToString()

const ElemTemplateElement* xalanc::ElemTemplateElement::beginChildrenToString ( StylesheetExecutionContext executionContext,
XalanDOMString result 
) const

Method to initiate output from the children to a string.

Parameters
executionContextcontext to execute this element
resultstring to contain the final result
Returns
the first child element to execute

◆ beginExecuteChildren()

virtual const ElemTemplateElement* xalanc::ElemTemplateElement::beginExecuteChildren ( StylesheetExecutionContext executionContext) const
virtual

Method to initiate the execution of the element's children.

Parameters
executionContextcontext to execute this element
Returns
the first child element to execute

◆ canGenerateAttributes() [1/2]

bool xalanc::ElemTemplateElement::canGenerateAttributes ( ) const
inline

Definition at line 729 of file ElemTemplateElement.hpp.

◆ canGenerateAttributes() [2/2]

void xalanc::ElemTemplateElement::canGenerateAttributes ( bool  value)
inlineprotected

Definition at line 743 of file ElemTemplateElement.hpp.

◆ childTypeAllowed()

virtual bool xalanc::ElemTemplateElement::childTypeAllowed ( int  xslToken) const
protectedvirtual

Given an xsl token type, determine whether or not a child of that type is allowed.

This is so derived types can determine whether a particular type of child is allowed for the instance. It is called from appendChildElem().

The default is to allow no types (no children)

Parameters
xslTokenThe xsl token value of the child.
Returns
true if the child is allowed, or false if not.

Reimplemented in xalanc::ElemTemplate, xalanc::ElemCallTemplate, xalanc::ElemAttributeSet, xalanc::ElemApplyTemplates, xalanc::ElemEmpty, xalanc::ElemPI, xalanc::ElemAttribute, xalanc::ElemText, xalanc::ElemChoose, and xalanc::ElemComment.

◆ disableOutputEscaping() [1/2]

bool xalanc::ElemTemplateElement::disableOutputEscaping ( ) const
inlineprotected

Definition at line 779 of file ElemTemplateElement.hpp.

◆ disableOutputEscaping() [2/2]

void xalanc::ElemTemplateElement::disableOutputEscaping ( bool  value)
inlineprotected

Definition at line 773 of file ElemTemplateElement.hpp.

◆ endChildrenToString()

void xalanc::ElemTemplateElement::endChildrenToString ( StylesheetExecutionContext executionContext) const

Method to indicate string output from the children is complete.

Parameters
executionContextcontext to execute this element

◆ endElement()

virtual void xalanc::ElemTemplateElement::endElement ( StylesheetExecutionContext executionContext) const
virtual

◆ endExecuteChildren()

virtual void xalanc::ElemTemplateElement::endExecuteChildren ( StylesheetExecutionContext executionContext) const
virtual

Method to indicate the execution of the element's children is complete.

Parameters
executionContextcontext to execute this element

◆ error() [1/9]

void xalanc::ElemTemplateElement::error ( StylesheetConstructionContext theContext,
XalanMessages::Codes  theCode 
)
protected

A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance.

Parameters
theContextThe StylesheetConstructionContext to use
theCodeThe code of the message

◆ error() [2/9]

void xalanc::ElemTemplateElement::error ( StylesheetConstructionContext theContext,
XalanMessages::Codes  theCode,
const XalanDOMChar *  theToken1,
const XalanDOMChar *  theToken2 
)
protected

A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance.

Parameters
theContextThe StylesheetConstructionContext to use
theCodeThe code of the message
theToken1The first substitution token for the message
theToken2The second substitution token for the message

◆ error() [3/9]

void xalanc::ElemTemplateElement::error ( StylesheetConstructionContext theContext,
XalanMessages::Codes  theCode,
const XalanDOMChar *  theToken1,
const XalanDOMChar *  theToken2,
const XalanDOMChar *  theToken3 
)
protected

A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance.

Parameters
theContextThe StylesheetConstructionContext to use
theCodeThe code of the message
theToken1The first substitution token for the message
theToken2The second substitution token for the message
theToken3The third substitution token for the message

◆ error() [4/9]

void xalanc::ElemTemplateElement::error ( StylesheetConstructionContext theContext,
XalanMessages::Codes  theCode,
const XalanDOMString theToken 
)
protected

A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance.

Parameters
theContextThe StylesheetConstructionContext to use
theCodeThe code of the message
theTokenThe substitution token for the message
theLocatorThe Locator instance to use, if any

◆ error() [5/9]

void xalanc::ElemTemplateElement::error ( StylesheetConstructionContext theContext,
XalanMessages::Codes  theCode,
const XalanDOMString theToken,
const Locator *  theLocator 
)
protected

A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance.

Parameters
theContextThe StylesheetConstructionContext to use
theCodeThe code of the message
theTokenThe substitution token for the message
theLocatorThe Locator instance to use, if any

◆ error() [6/9]

void xalanc::ElemTemplateElement::error ( StylesheetConstructionContext theContext,
XalanMessages::Codes  theCode,
const XalanDOMString theToken1,
const XalanDOMString theToken2 
)
protected

A convenience function for loading a message and reporting an error through the provided StylesheetConstructionContext instance.

Parameters
theContextThe StylesheetConstructionContext to use
theCodeThe code of the message
theToken1The first substitution token for the message
theToken2The second substitution token for the message

◆ error() [7/9]

void xalanc::ElemTemplateElement::error ( StylesheetExecutionContext theContext,
XalanMessages::Codes  theCode 
) const
protected

A convenience function for loading a message and reporting an error through the provided StylesheetExecutionContext instance.

Parameters
theContextThe StylesheetExecutionContext to use
theCodeThe code of the message

◆ error() [8/9]

void xalanc::ElemTemplateElement::error ( StylesheetExecutionContext theContext,
XalanMessages::Codes  theCode,
const Locator *  theLocator 
) const
protected

A convenience function for loading a message and reporting an error through the provided StylesheetExecutionContext instance.

Parameters
theContextThe StylesheetExecutionContext to use
theCodeThe code of the message
theLocatorThe Locator instance to use, if any

◆ error() [9/9]

void xalanc::ElemTemplateElement::error ( StylesheetExecutionContext theContext,
XalanMessages::Codes  theCode,
const XalanDOMString theToken 
) const
protected

A convenience function for loading a message and reporting an error through the provided StylesheetExecutionContext instance.

Parameters
theContextThe StylesheetExecutionContext to use
theCodeThe code of the message
theTokenThe substitution token for the message

◆ execute()

virtual void xalanc::ElemTemplateElement::execute ( StylesheetExecutionContext executionContext) const
virtual

Execute the element.

Parameters
executecontext to execute this element

◆ executeChildElement()

virtual bool xalanc::ElemTemplateElement::executeChildElement ( StylesheetExecutionContext executionContext,
const ElemTemplateElement element 
) const
virtual

Filters sub-elements that should be executed.

Parameters
executionContextcontext to execute element
elementthe element to be executed
Returns
true if element should be executed, false otherwise

Reimplemented in xalanc::ElemExtensionCall, xalanc::ElemForwardCompatible, and xalanc::ElemElement.

◆ executeChildren()

virtual void xalanc::ElemTemplateElement::executeChildren ( StylesheetExecutionContext executionContext) const
virtual

Execute the children of this element.

Parameters
executecontext to execute this element

◆ findTemplateToTransformChild() [1/2]

virtual const ElemTemplateElement* xalanc::ElemTemplateElement::findTemplateToTransformChild ( StylesheetExecutionContext executionContext,
const ElemTemplateElement xslInstruction,
const ElemTemplateElement theTemplate,
XalanNode child 
) const
protectedvirtual

Given an element, find the corresponding template.

Parameters
executionContextThe current execution context
xslInstructionThe calling element
templateThe template to use if xsl:for-each, or null.
childThe source context node.
Returns
matching template if any. Returns 0 if no matching template or corresponds to a default rule.

◆ findTemplateToTransformChild() [2/2]

virtual const ElemTemplateElement* xalanc::ElemTemplateElement::findTemplateToTransformChild ( StylesheetExecutionContext executionContext,
const ElemTemplateElement xslInstruction,
const ElemTemplateElement theTemplate,
XalanNode child,
XalanNode::NodeType  nodeType 
) const
protectedvirtual

Given an element, find the corresponding template.

Parameters
executionContextThe current execution context
xslInstructionThe calling element
templateThe template to use if xsl:for-each, or null.
childThe source context node.
nodeTypeThe type of child.
Returns
matching template if any. Returns 0 if no matching template or corresponds to a default rule.

◆ getColumnNumber()

XalanFileLoc xalanc::ElemTemplateElement::getColumnNumber ( ) const
inline

Definition at line 693 of file ElemTemplateElement.hpp.

◆ getElementName()

virtual const XalanDOMString& xalanc::ElemTemplateElement::getElementName ( ) const
pure virtual

◆ getFinishedConstruction()

bool xalanc::ElemTemplateElement::getFinishedConstruction ( ) const
inline

Get the flag indicating construction of the element is completed.

Definition at line 422 of file ElemTemplateElement.hpp.

◆ getFirstChildElem()

virtual ElemTemplateElement* xalanc::ElemTemplateElement::getFirstChildElem ( ) const
virtual

Get the first child.

Returns
first child node of this node

◆ getFirstChildElemToExecute()

virtual const ElemTemplateElement* xalanc::ElemTemplateElement::getFirstChildElemToExecute ( StylesheetExecutionContext executionContext) const
virtual

Returns the first sub-element (i.e.

children, attribute-sets, templates) to execute.

Parameters
executionContextcontext to execute element
Returns
first sub-element to execute, 0 only if no sub-elements to execute

Reimplemented in xalanc::ElemUse, xalanc::ElemApplyTemplates, xalanc::ElemCallTemplate, and xalanc::ElemFallback.

◆ getInvoker()

virtual const ElemTemplateElement* xalanc::ElemTemplateElement::getInvoker ( StylesheetExecutionContext executionContext) const
virtual

Returns the element that invoked this element.

Returns
element that invoked this element.

Reimplemented in xalanc::ElemTemplate, and xalanc::ElemAttributeSet.

◆ getLastChildElem()

virtual ElemTemplateElement* xalanc::ElemTemplateElement::getLastChildElem ( ) const
virtual

Get the last child.

Returns
last child node of this node

◆ getLineNumber()

XalanFileLoc xalanc::ElemTemplateElement::getLineNumber ( ) const
inline

Definition at line 687 of file ElemTemplateElement.hpp.

◆ getLocator()

virtual const Locator* xalanc::ElemTemplateElement::getLocator ( ) const
virtual

Get the Locator for the node.

This may return 0.

Returns
The Locator for the node.

◆ getNameAttribute()

virtual const XalanQName& xalanc::ElemTemplateElement::getNameAttribute ( ) const
virtual

Get the QName associated with any name attribute of this element.

If the element has no name attribute, this will be an empty QName.

Returns
A string containing the name of the element.

Reimplemented in xalanc::ElemTemplate, and xalanc::ElemVariable.

◆ getNamespaceForPrefix()

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

Retrieve a namespace corresponding to a prefix.

This assumes that the PrevixResolver holds its own namespace context, or is a namespace context itself.

Parameters
prefixPrefix to resolve
Returns
namespace that prefix resolves to, or null if prefix is not found

Implements xalanc::PrefixResolver.

◆ getNamespaceForPrefixInternal()

const XalanDOMString* xalanc::ElemTemplateElement::getNamespaceForPrefixInternal ( const XalanDOMString prefix) const
protected

Get the namespace for a given prefix.

Parameters
prefixThe prefix to search for
fExistsIf not null, set to true if the namespace was defined.
Returns
The namespace string.

◆ getNamespaces()

const NamespacesHandler& xalanc::ElemTemplateElement::getNamespaces ( ) const
inlineprotected

Definition at line 910 of file ElemTemplateElement.hpp.

◆ getNamespacesHandler()

const NamespacesHandler& xalanc::ElemTemplateElement::getNamespacesHandler ( ) const
inline

Get the namespaces handler for this element.

Returns
The element's NamespacesHandler instance.

Definition at line 391 of file ElemTemplateElement.hpp.

◆ getNextChildElemToExecute()

virtual const ElemTemplateElement* xalanc::ElemTemplateElement::getNextChildElemToExecute ( StylesheetExecutionContext executionContext,
const ElemTemplateElement currentElem 
) const
virtual

Returns the next sub-element (i.e.

children, attribute-sets, templates) to execute.

Parameters
executionContextcontext to execute element
currentElemthe last sub-element to be executed
Returns
next sub-element to execute, 0 only if no more sub-elements to execute

Reimplemented in xalanc::ElemForEach, xalanc::ElemUse, xalanc::ElemApplyTemplates, xalanc::ElemCallTemplate, xalanc::ElemFallback, xalanc::ElemApplyImport, and xalanc::ElemChoose.

◆ getNextSiblingElem()

virtual ElemTemplateElement* xalanc::ElemTemplateElement::getNextSiblingElem ( ) const
virtual

Get the next sibling.

Returns
next sibling node of this node

◆ getParentNodeElem()

virtual ElemTemplateElement* xalanc::ElemTemplateElement::getParentNodeElem ( ) const
virtual

Get the parent node.

Returns
parent node of this node

◆ getPreviousSiblingElem()

virtual ElemTemplateElement* xalanc::ElemTemplateElement::getPreviousSiblingElem ( ) const
virtual

Get the previous sibling.

Returns
previous sibling node of this node

◆ getStylesheet()

const Stylesheet& xalanc::ElemTemplateElement::getStylesheet ( ) const
inline

Retrieve the stylesheet from which this element comes.

Returns
reference to source stylesheet

Definition at line 402 of file ElemTemplateElement.hpp.

◆ getURI()

virtual const XalanDOMString& xalanc::ElemTemplateElement::getURI ( ) const
virtual

Retrieve the base URI for the resolver.

Returns
URI string

Implements xalanc::PrefixResolver.

◆ getXPath()

virtual const XPath* xalanc::ElemTemplateElement::getXPath ( XalanSize_t  index) const
virtual

Get XPath pattern/expression of one of the element atribute.

@index number of the attribute. If an attribute has more then one attribute with pattern/expression,the order of the returned expressions are undefined

Returns
pointer or null

Reimplemented in xalanc::ElemSort, xalanc::ElemNumber, xalanc::ElemTemplate, xalanc::ElemForEach, xalanc::ElemVariable, xalanc::ElemDecimalFormat, xalanc::ElemWithParam, xalanc::ElemValueOf, xalanc::ElemCopyOf, xalanc::ElemIf, and xalanc::ElemWhen.

◆ getXSLToken()

int xalanc::ElemTemplateElement::getXSLToken ( ) const
inline

Definition at line 315 of file ElemTemplateElement.hpp.

◆ hasChildren()

bool xalanc::ElemTemplateElement::hasChildren ( ) const
inline

Definition at line 717 of file ElemTemplateElement.hpp.

◆ hasDirectTemplate()

bool xalanc::ElemTemplateElement::hasDirectTemplate ( ) const
inline

Definition at line 723 of file ElemTemplateElement.hpp.

◆ hasParams()

bool xalanc::ElemTemplateElement::hasParams ( ) const
inline

Definition at line 699 of file ElemTemplateElement.hpp.

◆ hasPrefix() [1/2]

bool xalanc::ElemTemplateElement::hasPrefix ( ) const
inlineprotected

Definition at line 755 of file ElemTemplateElement.hpp.

◆ hasPrefix() [2/2]

void xalanc::ElemTemplateElement::hasPrefix ( bool  value)
inlineprotected

Definition at line 749 of file ElemTemplateElement.hpp.

◆ hasSingleTextChild()

bool xalanc::ElemTemplateElement::hasSingleTextChild ( ) const
inline

Definition at line 711 of file ElemTemplateElement.hpp.

◆ hasVariables()

bool xalanc::ElemTemplateElement::hasVariables ( ) const
inline

Definition at line 705 of file ElemTemplateElement.hpp.

◆ isAttrOK()

virtual bool xalanc::ElemTemplateElement::isAttrOK ( const XalanDOMChar *  attrName,
const AttributeListType atts,
XalanSize_t  which,
StylesheetConstructionContext constructionContext 
) const
virtual

See if this is a xmlns attribute or in a non-XSLT.

Parameters
attrNamequalified name of attribute
attsattribute list where the element comes from (not used at this time)
whichindex into the attribute list (not used at this time)
constructionContextThe current construction context
Returns
true if this is a namespace name

Reimplemented in xalanc::ElemLiteralResult.

◆ isDefaultTemplate()

bool xalanc::ElemTemplateElement::isDefaultTemplate ( ) const
inline

Definition at line 735 of file ElemTemplateElement.hpp.

◆ isValidNCName()

static bool xalanc::ElemTemplateElement::isValidNCName ( const XalanDOMString s)
static

Validate that the string is an NCName.

Parameters
sname in question
Returns
true if the string is a valid NCName according to XML rules
See also
http://www.w3.org/TR/REC-xml-names#NT-NCName

◆ isWhitespace()

virtual bool xalanc::ElemTemplateElement::isWhitespace ( ) const
virtual

Tell if the element will generate text which is XML whitespace.

Returns
true if the text is pure whitespace

Reimplemented in xalanc::ElemTextLiteral.

◆ namespacesPostConstruction()

virtual void xalanc::ElemTemplateElement::namespacesPostConstruction ( StylesheetConstructionContext constructionContext,
const NamespacesHandler theParentHandler,
NamespacesHandler theHandler 
)
protectedvirtual

Called after construction is completed.

This is a hook for deriving classes to handle post-construction with the instances HamespaceHandler instance, which is otherwise only available through a const accessor.

Reimplemented in xalanc::ElemLiteralResult, and xalanc::ElemElement.

◆ postConstruction()

virtual void xalanc::ElemTemplateElement::postConstruction ( StylesheetConstructionContext constructionContext,
const NamespacesHandler theParentHandler 
)
virtual

Called after construction is completed.

Reimplemented in xalanc::ElemForEach, xalanc::ElemCallTemplate, xalanc::ElemUse, and xalanc::ElemLiteralResult.

◆ preserveSpace() [1/2]

bool xalanc::ElemTemplateElement::preserveSpace ( ) const
inlineprotected

Definition at line 767 of file ElemTemplateElement.hpp.

◆ preserveSpace() [2/2]

void xalanc::ElemTemplateElement::preserveSpace ( bool  value)
inlineprotected

Definition at line 761 of file ElemTemplateElement.hpp.

◆ processPrefixControl()

bool xalanc::ElemTemplateElement::processPrefixControl ( StylesheetConstructionContext constructionContext,
const Stylesheet stylesheetTree,
const XalanDOMString localName,
const XalanDOMChar *  attrValue 
)
protected

Process the exclude-result-prefixes or the extension-element-prefixes attributes, for the purpose of prefix exclusion.

Parameters
constructionContextcontext when object consructed
stylesheetTreeThe current Stylesheet object.
localNameThe local name of the attribute.
attrValueThe value of the attribute.

◆ processSortElement()

virtual void xalanc::ElemTemplateElement::processSortElement ( StylesheetConstructionContext constructionContext,
Stylesheet theStylesheet,
const AttributeListType atts,
const Locator *  locator = 0 
)
virtual

Called during compilation to process xsl:sort elements in the stylesheet.

Parameters
constructionContextThe current construction context
theStylesheetThe owning stylesheet
attsThe list of attributes for the sort element
locatorA Locator instance for error reporting, if available.
Returns
nothing

Reimplemented in xalanc::ElemForEach.

◆ processSpaceAttr()

bool xalanc::ElemTemplateElement::processSpaceAttr ( const XalanDOMChar *  elementName,
const XalanDOMChar *  aname,
const AttributeListType atts,
XalanSize_t  which,
StylesheetConstructionContext constructionContext 
)

Tell whether or not this is a xml:space attribute and, if so, process it.

Parameters
elementNamename of the element with the attribute
anamename of the attribute in question
attsattribute list that owns the attribute
whichindex of the attribute into the attribute list
constructionContextThe current construction context
Returns
true if this is a xml:space attribute

◆ setDefaultTemplate()

virtual void xalanc::ElemTemplateElement::setDefaultTemplate ( bool  value)
virtual

Sets a flag indicating this is the default template.

Parameters
valueThe value of flag.

◆ setFinishedConstruction()

void xalanc::ElemTemplateElement::setFinishedConstruction ( bool  fValue)
inline

Set the flag indicating construction of the element is completed.

Parameters
fValueThe value to set

Definition at line 413 of file ElemTemplateElement.hpp.

◆ setFirstChildElem()

virtual void xalanc::ElemTemplateElement::setFirstChildElem ( ElemTemplateElement theChild)
virtual

Set the first child.

theChild - the new value for the first child.

Returns
nothing

◆ setNextSiblingElem()

virtual void xalanc::ElemTemplateElement::setNextSiblingElem ( ElemTemplateElement theSibling)
virtual

Set the next sibling.

theSibling - the new value for the next sibling.

Returns
nothing

◆ setParentNodeElem()

virtual void xalanc::ElemTemplateElement::setParentNodeElem ( ElemTemplateElement theParent)
virtual

Set the parent node.

theParent - the new value for the parent.

Returns
nothing

Reimplemented in xalanc::ElemVariable.

◆ setPreviousSiblingElem()

virtual void xalanc::ElemTemplateElement::setPreviousSiblingElem ( ElemTemplateElement theSibling)
virtual

Set the previous sibling.

theSibling - the new value for the previous sibling.

Returns
nothing

◆ startElement()

virtual const ElemTemplateElement* xalanc::ElemTemplateElement::startElement ( StylesheetExecutionContext executionContext) const
virtual

◆ warn() [1/4]

void xalanc::ElemTemplateElement::warn ( StylesheetConstructionContext theContext,
XalanMessages::Codes  theCode,
const XalanDOMChar *  theToken1,
const XalanDOMChar *  theToken2,
const XalanDOMChar *  theToken3 
)
protected

A convenience function for loading a message and reporting a warning through the provided StylesheetConstructionContext instance.

Parameters
theContextThe StylesheetConstructionContext to use
theCodeThe code of the message
theToken1The first substitution token for the message
theToken2The second substitution token for the message
theToken3The third substitution token for the message

◆ warn() [2/4]

void xalanc::ElemTemplateElement::warn ( StylesheetExecutionContext theContext,
XalanMessages::Codes  theCode 
) const
protected

A convenience function for loading a message and reporting a warning through the provided StylesheetExecutionContext instance.

Parameters
theContextThe StylesheetExecutionContext to use
theCodeThe code of the message

◆ warn() [3/4]

void xalanc::ElemTemplateElement::warn ( StylesheetExecutionContext theContext,
XalanMessages::Codes  theCode,
const Locator *  theLocator 
) const
protected

A convenience function for loading a message and reporting a warning through the provided StylesheetExecutionContext instance.

Parameters
theContextThe StylesheetExecutionContext to use
theCodeThe code of the message
theLocatorThe Locator instance to use, if any

◆ warn() [4/4]

void xalanc::ElemTemplateElement::warn ( StylesheetExecutionContext theContext,
XalanMessages::Codes  theCode,
const XalanDOMString theToken 
) const
protected

A convenience function for loading a message and reporting a warning through the provided StylesheetExecutionContext instance.

Parameters
theContextThe StylesheetExecutionContext to use
theCodeThe code of the message
theTokenThe substitution token for the message

Member Data Documentation

◆ m_directTemplate

const ElemTemplate* xalanc::ElemTemplateElement::m_directTemplate

Definition at line 1192 of file ElemTemplateElement.hpp.

◆ m_firstChild

ElemTemplateElement* xalanc::ElemTemplateElement::m_firstChild

Definition at line 1191 of file ElemTemplateElement.hpp.

◆ m_textLiteralChild

const ElemTextLiteral* xalanc::ElemTemplateElement::m_textLiteralChild

Definition at line 1193 of file ElemTemplateElement.hpp.

◆ s_emptyString

const XalanDOMString xalanc::ElemTemplateElement::s_emptyString
staticprotected

Definition at line 1121 of file ElemTemplateElement.hpp.


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