18#if !defined(XALAN_ELEMTEMPLATEELEMENT_HEADER_GUARD)
19#define XALAN_ELEMTEMPLATEELEMENT_HEADER_GUARD
47#include "LocalMsgIndex.hpp"
51namespace XERCES_CPP_NAMESPACE
67using xercesc::AttributeList;
68using xercesc::Locator;
71class NamespacesHandler;
73class StylesheetConstructionContext;
74class StylesheetExecutionContext;
129 virtual const Locator*
177#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
393 return m_namespacesHandler;
415 setFlag(eFinishedConstruction,
fValue);
424 return getFlag(eFinishedConstruction);
445#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
519#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
689 return m_locatorProxy.getLineNumber();
695 return m_locatorProxy.getColumnNumber();
701 return getFlag(eHasParams);
707 return getFlag(eHasVariables);
713 return getFlag(eHasSingleTextChild);
719 return m_firstChild != 0 ?
true :
false;
725 return getFlag(eHasDirectTemplate);
731 return getFlag(eCanGenerateAttributes);
737 return getFlag(eDefaultTemplate);
745 setFlag(eCanGenerateAttributes, value);
751 setFlag(eHasPrefix, value);
757 return getFlag(eHasPrefix);
763 setFlag(eSpacePreserve, value);
769 return getFlag(eSpacePreserve);
775 setFlag(eDisableOutputEscaping, value);
781 return getFlag(eDisableOutputEscaping);
810#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
912 return m_namespacesHandler;
926 XalanMessages::Codes
theCode)
const;
969 XalanMessages::Codes
theCode)
const;
1012 XalanMessages::Codes
theCode);
1128 eHasSingleTextChild = 2,
1130 eHasDirectTemplate = 8,
1131 eCanGenerateAttributes = 16,
1132 eDefaultTemplate = 32,
1133 eSpacePreserve = 64,
1134 eFinishedConstruction = 128,
1136 eDisableOutputEscaping = 512
1150 if (theValue ==
true)
1156 m_flags &= ~theFlag;
1161#if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1172 StylesheetExecutionContext& executionContext,
1173 XalanDOMString& result)
const;
1176 Stylesheet& m_stylesheet;
1181 NamespacesHandler m_namespacesHandler;
1183 const int m_xslToken;
1185 ElemTemplateElement* m_parentNode;
1186 ElemTemplateElement* m_nextSibling;
1187 ElemTemplateElement* m_previousSibling;
1196 LocatorProxy m_locatorProxy;
1198 unsigned short m_flags;
#define XALAN_XSLT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
const XalanDOMString & getURI() const
virtual XalanFileLoc getLineNumber() const
virtual const XMLCh * getPublicId() const
LocatorProxy(XalanFileLoc theLineNumber, XalanFileLoc theColumnNumber, const XalanDOMString &theURI)
virtual XalanFileLoc getColumnNumber() const
virtual const XMLCh * getSystemId() const
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.
void hasPrefix(bool value)
void setFinishedConstruction(bool fValue)
Set the flag indicating construction of the element is completed.
bool hasDirectTemplate() const
ElemTemplateElement(StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, XalanFileLoc lineNumber, XalanFileLoc columnNumber, int xslToken)
Construct a template element instance.
virtual ElemTemplateElement * getLastChildElem() const
Get the last child.
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.
virtual const ElemTemplateElement * beginExecuteChildren(StylesheetExecutionContext &executionContext) const
Method to initiate the execution of the element's children.
virtual const Locator * getLocator() const
Get the Locator for the node.
void error(StylesheetExecutionContext &theContext, XalanMessages::Codes theCode) const
A convenience function for loading a message and reporting an error through the provided StylesheetEx...
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 StylesheetCo...
const NamespacesHandler & getNamespaces() const
static const XalanDOMString s_emptyString
virtual const ElemTemplateElement * getInvoker(StylesheetExecutionContext &executionContext) const
Returns the element that invoked this element.
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.
virtual ElemTemplateElement * getFirstChildElem() const
Get the first child.
virtual void setDefaultTemplate(bool value)
Sets a flag indicating this is the default template.
virtual ElemTemplateElement * getPreviousSiblingElem() const
Get the previous sibling.
static bool isValidNCName(const XalanDOMString &s)
Validate that the string is an NCName.
const ElemTemplate * m_directTemplate
const XalanDOMString * getNamespaceForPrefixInternal(const XalanDOMString &prefix) const
Get the namespace for a given prefix.
virtual const ElemTemplateElement * getFirstChildElemToExecute(StylesheetExecutionContext &executionContext) const
Returns the first sub-element (i.e.
const NamespacesHandler & getNamespacesHandler() const
Get the namespaces handler for this element.
virtual void endExecuteChildren(StylesheetExecutionContext &executionContext) const
Method to indicate the execution of the element's children is complete.
virtual void setParentNodeElem(ElemTemplateElement *theParent)
Set the parent node.
XalanFileLoc getLineNumber() const
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 StylesheetC...
bool hasSingleTextChild() const
bool preserveSpace() const
bool canGenerateAttributes() const
void error(StylesheetConstructionContext &theContext, XalanMessages::Codes theCode, const XalanDOMString &theToken)
A convenience function for loading a message and reporting an error through the provided StylesheetCo...
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 StylesheetCo...
virtual const XalanDOMString & getURI() const
Retrieve the base URI for the resolver.
virtual void namespacesPostConstruction(StylesheetConstructionContext &constructionContext, const NamespacesHandler &theParentHandler, NamespacesHandler &theHandler)
Called after construction is completed.
void canGenerateAttributes(bool value)
virtual bool isWhitespace() const
Tell if the element will generate text which is XML whitespace.
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 StylesheetE...
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 StylesheetCo...
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 StylesheetEx...
virtual ElemTemplateElement * getParentNodeElem() const
Get the parent node.
virtual void endElement(StylesheetExecutionContext &executionContext) const
Completes "post-processing" afer any sub-elements are invoked (i.e.
const ElemTemplateElement * beginChildrenToString(StylesheetExecutionContext &executionContext, XalanDOMString &result) const
Method to initiate output from the children to a string.
void error(StylesheetConstructionContext &theContext, XalanMessages::Codes theCode)
A convenience function for loading a message and reporting an error through the provided StylesheetCo...
void endChildrenToString(StylesheetExecutionContext &executionContext) const
Method to indicate string output from the children is complete.
virtual const XalanQName & getNameAttribute() const
Get the QName associated with any name attribute of this element.
virtual void setFirstChildElem(ElemTemplateElement *theChild)
Set the first child.
virtual const XalanDOMString * getNamespaceForPrefix(const XalanDOMString &prefix) const
Retrieve a namespace corresponding to a prefix.
bool hasVariables() const
virtual const XalanDOMString & getElementName() const =0
Get a string for the name of the element.
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 StylesheetE...
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 StylesheetEx...
bool isDefaultTemplate() const
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.
virtual void setNextSiblingElem(ElemTemplateElement *theSibling)
Set the next sibling.
virtual bool executeChildElement(StylesheetExecutionContext &executionContext, const ElemTemplateElement *element) const
Filters sub-elements that should be executed.
const ElemTextLiteral * m_textLiteralChild
virtual ElemTemplateElement * appendChildElem(ElemTemplateElement *newChild)
Append a child.
virtual void execute(StylesheetExecutionContext &executionContext) const
Execute the element.
ElemTemplateElement * m_firstChild
virtual void executeChildren(StylesheetExecutionContext &executionContext) const
Execute the children of this element.
virtual const ElemTemplateElement * findTemplateToTransformChild(StylesheetExecutionContext &executionContext, const ElemTemplateElement &xslInstruction, const ElemTemplateElement *theTemplate, XalanNode *child) const
Given an element, find the corresponding template.
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 ...
virtual bool childTypeAllowed(int xslToken) const
Given an xsl token type, determine whether or not a child of that type is allowed.
XalanFileLoc getColumnNumber() const
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 StylesheetCo...
void warn(StylesheetExecutionContext &theContext, XalanMessages::Codes theCode) const
A convenience function for loading a message and reporting a warning through the provided StylesheetE...
virtual void addToStylesheet(StylesheetConstructionContext &constructionContext, Stylesheet &theStylesheet)
Called during compilation when an instance is not parented by another element, and thus,...
void preserveSpace(bool value)
virtual const ElemTemplateElement * findTemplateToTransformChild(StylesheetExecutionContext &executionContext, const ElemTemplateElement &xslInstruction, const ElemTemplateElement *theTemplate, XalanNode *child, XalanNode::NodeType nodeType) const
Given an element, find the corresponding template.
virtual const ElemTemplateElement * startElement(StylesheetExecutionContext &executionContext) const
Completes "pre-processing" before any sub-elements are invoked (i.e.
virtual const ElemTemplateElement * getNextChildElemToExecute(StylesheetExecutionContext &executionContext, const ElemTemplateElement *currentElem) const
Returns the next sub-element (i.e.
virtual ~ElemTemplateElement()
virtual void postConstruction(StylesheetConstructionContext &constructionContext, const NamespacesHandler &theParentHandler)
Called after construction is completed.
virtual const XPath * getXPath(XalanSize_t index) const
Get XPath pattern/expression of one of the element atribute.
bool getFinishedConstruction() const
Get the flag indicating construction of the element is completed.
const Stylesheet & getStylesheet() const
Retrieve the stylesheet from which this element comes.
bool disableOutputEscaping() const
void disableOutputEscaping(bool value)
virtual void setPreviousSiblingElem(ElemTemplateElement *theSibling)
Set the previous sibling.
virtual ElemTemplateElement * getNextSiblingElem() const
Get the next sibling.
This class defines an interface for classes that resolve namespace prefixes to their URIs.
This class represents the base stylesheet or an "import" stylesheet.
This class defines a base class for Locator derivations in Xalan.
Class to represent a qualified name.
xercesc::Locator LocatorType
xercesc::AttributeList AttributeListType
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)