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_AVT_HEADER_GUARD) 00017 #define XALAN_AVT_HEADER_GUARD 00018 00019 // Base include file. Must be first. 00020 #include <xalanc/XSLT/XSLTDefinitions.hpp> 00021 00022 00023 00024 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00025 00026 00027 00028 XALAN_DECLARE_XERCES_CLASS(Locator) 00029 00030 00031 00032 XALAN_CPP_NAMESPACE_BEGIN 00033 00034 00035 00036 typedef XERCES_CPP_NAMESPACE_QUALIFIER Locator LocatorType; 00037 00038 00039 00040 class AVTPart; 00041 class PrefixResolver; 00042 class XPathExecutionContext; 00043 class XalanNode; 00044 class StringTokenizer; 00045 class StylesheetConstructionContext; 00046 00047 00048 00052 class AVT 00053 { 00054 public: 00055 00056 #if defined(XALAN_STRICT_ANSI_HEADERS) 00057 typedef std::size_t size_type; 00058 #else 00059 typedef size_t size_type; 00060 #endif 00061 00073 AVT( 00074 StylesheetConstructionContext& constructionContext, 00075 const LocatorType* locator, 00076 const XalanDOMChar* name, 00077 const XalanDOMChar* stringedValue, 00078 const PrefixResolver& resolver); 00079 00080 virtual 00081 ~AVT(); 00082 00088 const XalanDOMString& 00089 getName() const 00090 { 00091 return m_name; 00092 } 00093 00102 void 00103 evaluate( 00104 XalanDOMString& buf, 00105 XalanNode* contextNode, 00106 const PrefixResolver& prefixResolver, 00107 XPathExecutionContext& executionContext) const 00108 { 00109 if(m_simpleString != 0) 00110 { 00111 buf.assign(m_simpleString, m_simpleStringLength); 00112 } 00113 else 00114 { 00115 doEvaluate(buf, contextNode, prefixResolver, executionContext); 00116 } 00117 } 00118 00126 void 00127 evaluate( 00128 XalanDOMString& buf, 00129 const PrefixResolver& prefixResolver, 00130 XPathExecutionContext& executionContext) const 00131 { 00132 if(m_simpleString != 0) 00133 { 00134 buf.assign(m_simpleString, m_simpleStringLength); 00135 } 00136 else 00137 { 00138 doEvaluate(buf, prefixResolver, executionContext); 00139 } 00140 } 00141 00142 private: 00143 00144 void 00145 doEvaluate( 00146 XalanDOMString& buf, 00147 const PrefixResolver& prefixResolver, 00148 XPathExecutionContext& executionContext) const; 00149 00150 void 00151 doEvaluate( 00152 XalanDOMString& buf, 00153 XalanNode* contextNode, 00154 const PrefixResolver& prefixResolver, 00155 XPathExecutionContext& executionContext) const; 00156 00157 void 00158 nextToken( 00159 StylesheetConstructionContext& constructionContext, 00160 const LocatorType* locator, 00161 StringTokenizer& tokenizer, 00162 XalanDOMString& token); 00163 00164 // not implemented 00165 AVT(const AVT&); 00166 00167 AVT& 00168 operator=(const AVT&); 00169 00170 bool 00171 operator==(const AVT&) const; 00172 00173 00174 // Data members... 00175 const AVTPart** m_parts; 00176 00177 size_type m_partsSize; 00178 00179 const XalanDOMChar* m_simpleString; 00180 00181 XalanDOMString::size_type m_simpleStringLength; 00182 00183 const XalanDOMString& m_name; 00184 00185 static const XalanDOMString s_emptyString; 00186 }; 00187 00188 00189 00190 XALAN_CPP_NAMESPACE_END 00191 00192 00193 00194 #endif // XALAN_AVT_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 |
|