00001 /* 00002 * Copyright 1999-2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #if !defined(XALAN_ELEMTEMPLATE_HEADER_GUARD) 00017 #define XALAN_ELEMTEMPLATE_HEADER_GUARD 00018 00019 00020 00021 // Base include file. Must be first. 00022 #include "XSLTDefinitions.hpp" 00023 00024 // Base class header file. 00025 #include "ElemTemplateElement.hpp" 00026 00027 00028 00029 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00030 00031 00032 00033 XALAN_CPP_NAMESPACE_BEGIN 00034 00035 00036 00037 class XPath; 00038 00039 00040 00041 class ElemTemplate : public ElemTemplateElement 00042 { 00043 public: 00044 00045 typedef ElemTemplateElement ParentType; 00046 00056 ElemTemplate( 00057 StylesheetConstructionContext& constructionContext, 00058 Stylesheet& stylesheetTree, 00059 const AttributeListType& atts, 00060 int lineNumber, 00061 int columnNumber); 00062 00063 virtual 00064 ~ElemTemplate(); 00065 00071 const XalanQName& 00072 getMode() const 00073 { 00074 assert(m_mode != 0); 00075 00076 return *m_mode; 00077 } 00078 00084 const XPath* 00085 getMatchPattern() const 00086 { 00087 return m_matchPattern; 00088 } 00089 00095 double 00096 getPriority() const 00097 { 00098 return m_priority; 00099 } 00100 00101 virtual const XalanQName& 00102 getNameAttribute() const; 00103 00104 virtual void 00105 addToStylesheet( 00106 StylesheetConstructionContext& constructionContext, 00107 Stylesheet& theStylesheet); 00108 00109 virtual const XalanDOMString& 00110 getElementName() const; 00111 00112 // These methods are inherited from ElemTemplateElement ... 00113 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION) 00114 virtual const ElemTemplateElement* 00115 startElement(StylesheetExecutionContext& executionContext) const; 00116 00117 virtual void 00118 endElement(StylesheetExecutionContext& executionContext) const; 00119 00120 virtual const ElemTemplateElement* 00121 getInvoker(StylesheetExecutionContext& executionContext) const; 00122 #else 00123 virtual void 00124 execute(StylesheetExecutionContext& executionContext) const; 00125 00126 virtual void 00127 executeChildren(StylesheetExecutionContext& executionContext) const; 00128 00129 virtual void 00130 executeChildren( 00131 StylesheetExecutionContext& executionContext, 00132 XalanNode* sourceNode) const; 00133 void 00134 executeAsNamed(StylesheetExecutionContext& executionContext) const 00135 { 00136 ParentType::executeChildren(executionContext); 00137 } 00138 #endif 00139 00140 virtual const XPath* 00141 getXPath(unsigned int index = 0) const; 00142 00143 protected: 00144 00145 virtual bool 00146 childTypeAllowed(int xslToken) const; 00147 00148 private: 00149 00150 // not implemented 00151 ElemTemplate(const ElemTemplate&); 00152 00153 ElemTemplate& 00154 operator=(const ElemTemplate&); 00155 00156 // Data members... 00157 const XPath* m_matchPattern; 00158 00159 const XalanQName* m_name; 00160 const XalanQName* m_mode; 00161 00162 double m_priority; 00163 }; 00164 00165 00166 00167 XALAN_CPP_NAMESPACE_END 00168 00169 00170 00171 #endif // XALAN_ELEMTEMPLATE_HEADER_GUARD
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.10 |
|