 |
Xalan-C++ API Reference
1.12.0
|
Go to the documentation of this file.
18 #if !defined(XALAN_ELEMTEMPLATEELEMENT_HEADER_GUARD)
19 #define XALAN_ELEMTEMPLATEELEMENT_HEADER_GUARD
47 #include "LocalMsgIndex.hpp"
51 namespace XERCES_CPP_NAMESPACE
67 using xercesc::AttributeList;
68 using xercesc::Locator;
70 class ElemTextLiteral;
71 class NamespacesHandler;
73 class StylesheetConstructionContext;
74 class StylesheetExecutionContext;
97 XalanFileLoc lineNumber,
98 XalanFileLoc columnNumber,
118 XalanFileLoc lineNumber = XalanLocator::getUnknownValue(),
119 XalanFileLoc columnNumber = XalanLocator::getUnknownValue());
129 virtual const Locator*
144 const XalanDOMChar* attrName,
161 const XalanDOMChar* elementName,
162 const XalanDOMChar* aname,
177 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
277 childrenToResultAttribute(
375 const Locator* locator = 0);
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)
641 XalanFileLoc theLineNumber,
642 XalanFileLoc theColumnNumber,
678 const XalanFileLoc m_lineNumber;
680 const XalanFileLoc m_columnNumber;
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);
798 const XalanDOMChar* attrValue);
810 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
912 return m_namespacesHandler;
926 XalanMessages::Codes theCode)
const;
940 XalanMessages::Codes theCode,
955 XalanMessages::Codes theCode,
956 const Locator* theLocator)
const;
969 XalanMessages::Codes theCode)
const;
983 XalanMessages::Codes theCode,
998 XalanMessages::Codes theCode,
999 const Locator* theLocator)
const;
1012 XalanMessages::Codes theCode);
1027 XalanMessages::Codes theCode,
1043 XalanMessages::Codes theCode,
1045 const Locator* theLocator);
1060 XalanMessages::Codes theCode,
1077 XalanMessages::Codes theCode,
1078 const XalanDOMChar* theToken1,
1079 const XalanDOMChar* theToken2);
1095 XalanMessages::Codes theCode,
1096 const XalanDOMChar* theToken1,
1097 const XalanDOMChar* theToken2,
1098 const XalanDOMChar* theToken3);
1114 XalanMessages::Codes theCode,
1115 const XalanDOMChar* theToken1,
1116 const XalanDOMChar* theToken2,
1117 const XalanDOMChar* theToken3);
1128 eHasSingleTextChild = 2,
1130 eHasDirectTemplate = 8,
1131 eCanGenerateAttributes = 16,
1132 eDefaultTemplate = 32,
1133 eSpacePreserve = 64,
1134 eFinishedConstruction = 128,
1136 eDisableOutputEscaping = 512
1140 getFlag(eFlags theFlag)
const
1142 return m_flags & theFlag ? true :
false;
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;
1218 #endif // XALAN_ELEMTEMPLATEELEMENT_HEADER_GUARD
virtual const Locator * getLocator() const
Get the Locator for the node.
XalanFileLoc getLineNumber() const
const NamespacesHandler & getNamespacesHandler() const
Get the namespaces handler for this element.
virtual bool childTypeAllowed(int xslToken) const
Given an xsl token type, determine whether or not a child of that type is allowed.
const Stylesheet & getStylesheet() const
Retrieve the stylesheet from which this element comes.
static bool isValidNCName(const XalanDOMString &s)
Validate that the string is an NCName.
virtual ElemTemplateElement * getLastChildElem() const
Get the last child.
virtual bool isWhitespace() const
Tell if the element will generate text which is XML whitespace.
virtual ElemTemplateElement * getNextSiblingElem() const
Get the next sibling.
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual ElemTemplateElement * getPreviousSiblingElem() const
Get the previous sibling.
virtual void setParentNodeElem(ElemTemplateElement *theParent)
Set the parent node.
xercesc::AttributeList AttributeListType
void preserveSpace(bool value)
ElemTemplateElement * m_firstChild
virtual const ElemTemplateElement * findTemplateToTransformChild(StylesheetExecutionContext &executionContext, const ElemTemplateElement &xslInstruction, const ElemTemplateElement *theTemplate, XalanNode *child) const
Given an element, find the corresponding template.
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...
virtual ElemTemplateElement * appendChildElem(ElemTemplateElement *newChild)
Append a child.
ElemTemplateElement(StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, XalanFileLoc lineNumber, XalanFileLoc columnNumber, int xslToken)
Construct a template element instance.
virtual const XMLCh * getSystemId() const
void endChildrenToString(StylesheetExecutionContext &executionContext) const
Method to indicate string output from the children is complete.
virtual const ElemTemplateElement * startElement(StylesheetExecutionContext &executionContext) const
Completes "pre-processing" before any sub-elements are invoked (i.e.
bool canGenerateAttributes() const
const ElemTemplateElement * beginChildrenToString(StylesheetExecutionContext &executionContext, XalanDOMString &result) const
Method to initiate output from the children to a string.
#define XALAN_XSLT_EXPORT
virtual const XMLCh * getPublicId() const
const ElemTextLiteral * m_textLiteralChild
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.
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
virtual ElemTemplateElement * getFirstChildElem() const
Get the first child.
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...
virtual const ElemTemplateElement * getFirstChildElemToExecute(StylesheetExecutionContext &executionContext) const
Returns the first sub-element (i.e.
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...
void hasPrefix(bool value)
virtual void setDefaultTemplate(bool value)
Sets a flag indicating this is the default template.
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...
const XalanDOMString * getNamespaceForPrefixInternal(const XalanDOMString &prefix) const
Get the namespace for a given prefix.
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.
void error(StylesheetExecutionContext &theContext, XalanMessages::Codes theCode) const
A convenience function for loading a message and reporting an error through the provided StylesheetEx...
bool hasDirectTemplate() const
virtual const XalanDOMString & getURI() const
Retrieve the base URI for the resolver.
bool preserveSpace() const
virtual const ElemTemplateElement * getNextChildElemToExecute(StylesheetExecutionContext &executionContext, const ElemTemplateElement *currentElem) const
Returns the next sub-element (i.e.
void warn(StylesheetExecutionContext &theContext, XalanMessages::Codes theCode) const
A convenience function for loading a message and reporting a warning through the provided StylesheetE...
virtual XalanFileLoc getColumnNumber() const
virtual void setFirstChildElem(ElemTemplateElement *theChild)
Set the first child.
LocatorProxy(XalanFileLoc theLineNumber, XalanFileLoc theColumnNumber, const XalanDOMString &theURI)
virtual bool executeChildElement(StylesheetExecutionContext &executionContext, const ElemTemplateElement *element) const
Filters sub-elements that should be executed.
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 void executeChildren(StylesheetExecutionContext &executionContext) const
Execute the children of this element.
void error(StylesheetConstructionContext &theContext, XalanMessages::Codes theCode)
A convenience function for loading a message and reporting an error through the provided StylesheetCo...
XalanFileLoc getColumnNumber() const
virtual void endElement(StylesheetExecutionContext &executionContext) const
Completes "post-processing" afer any sub-elements are invoked (i.e.
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...
virtual void namespacesPostConstruction(StylesheetConstructionContext &constructionContext, const NamespacesHandler &theParentHandler, NamespacesHandler &theHandler)
Called after construction is completed.
void canGenerateAttributes(bool value)
This class defines an interface for classes that resolve namespace prefixes to their URIs.
virtual const ElemTemplateElement * beginExecuteChildren(StylesheetExecutionContext &executionContext) const
Method to initiate the execution of the element's children.
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...
virtual void addToStylesheet(StylesheetConstructionContext &constructionContext, Stylesheet &theStylesheet)
Called during compilation when an instance is not parented by another element, and thus,...
virtual void setPreviousSiblingElem(ElemTemplateElement *theSibling)
Set the previous sibling.
virtual XalanFileLoc getLineNumber() const
virtual void execute(StylesheetExecutionContext &executionContext) const
Execute the element.
bool isDefaultTemplate() const
bool getFinishedConstruction() const
Get the flag indicating construction of the element is completed.
const ElemTemplate * m_directTemplate
virtual const ElemTemplateElement * getInvoker(StylesheetExecutionContext &executionContext) const
Returns the element that invoked this element.
static const XalanDOMString s_emptyString
void disableOutputEscaping(bool value)
virtual const XalanQName & getNameAttribute() const
Get the QName associated with any name attribute of this element.
virtual void endExecuteChildren(StylesheetExecutionContext &executionContext) const
Method to indicate the execution of the element's children is complete.
virtual void setNextSiblingElem(ElemTemplateElement *theSibling)
Set the next sibling.
bool disableOutputEscaping() const
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 void postConstruction(StylesheetConstructionContext &constructionContext, const NamespacesHandler &theParentHandler)
Called after construction is completed.
virtual const XalanDOMString & getElementName() const =0
Get a string for the name of the element.
This class represents the base stylesheet or an "import" stylesheet.
bool hasSingleTextChild() const
Class to represent a qualified name.
virtual ElemTemplateElement * getParentNodeElem() const
Get the parent node.
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...
virtual const XPath * getXPath(XalanSize_t index) const
Get XPath pattern/expression of one of the element atribute.
virtual const XalanDOMString * getNamespaceForPrefix(const XalanDOMString &prefix) const
Retrieve a namespace corresponding to a prefix.
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...
bool hasVariables() const
const XalanDOMString & getURI() 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...
const NamespacesHandler & getNamespaces() const
This class defines a base class for Locator derivations in Xalan.
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.
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.
void setFinishedConstruction(bool fValue)
Set the flag indicating construction of the element is completed.
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...
virtual ~ElemTemplateElement()
xercesc::Locator LocatorType