00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 #if !defined(XALAN_SelectionEvent_HEADER_GUARD) 00019 #define XALAN_SelectionEvent_HEADER_GUARD 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/XSLT/XSLTDefinitions.hpp> 00025 00026 00027 00028 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00029 00030 00031 00032 #include <xalanc/XPath/XObject.hpp> 00033 00034 00035 00036 XALAN_CPP_NAMESPACE_BEGIN 00037 00038 00039 00040 class XalanNode; 00041 class ElemTemplateElement; 00042 class StylesheetExecutionContext; 00043 class XPath; 00044 00045 00046 00047 class XALAN_XSLT_EXPORT SelectionEvent 00048 { 00049 public: 00050 00051 /** 00052 * Create an event originating at the given node of the style tree. 00053 * 00054 * @param executionContext The current execution context 00055 * @param sourceNode The source node selected. 00056 * @param styleNode The node in the style tree reference for the event 00057 * @param attributeName The attribute name where the XPath expression was supplied 00058 * @param xpath The XPath instance executed 00059 * @param selection The result of evaluating the XPath 00060 * 00061 */ 00062 SelectionEvent( 00063 StylesheetExecutionContext& executionContext, 00064 const XalanNode* sourceNode, 00065 const ElemTemplateElement& styleNode, 00066 const XalanDOMString& attributeName, 00067 const XPath& xpath, 00068 const XObjectPtr selection); 00069 00070 /** 00071 * Create an event originating at the given node of the style tree. 00072 * 00073 * @param executionContext The current execution context 00074 * @param sourceNode The source node selected. 00075 * @param styleNode The node in the style tree reference for the event 00076 * @param attributeName The attribute name where the XPath expression was supplied 00077 * @param xpathExpression The XPath expression executed 00078 * @param selection The result of evaluating the XPath 00079 * 00080 */ 00081 SelectionEvent( 00082 StylesheetExecutionContext& executionContext, 00083 const XalanNode* sourceNode, 00084 const ElemTemplateElement& styleNode, 00085 const XalanDOMString& attributeName, 00086 const XalanDOMString& xpathExpression, 00087 const XObjectPtr selection); 00088 00089 /** 00090 * Create an event originating at the given node of the style tree. 00091 * 00092 * @param executionContext The current execution context 00093 * @param sourceNode The source node selected. 00094 * @param styleNode The node in the style tree reference for the event 00095 * @param attributeName The attribute name where the XPath expression was supplied 00096 * @param xpath The XPath instance executed 00097 * @param selection The result of evaluating the XPath 00098 * 00099 */ 00100 SelectionEvent( 00101 StylesheetExecutionContext& executionContext, 00102 const XalanNode* sourceNode, 00103 const ElemTemplateElement& styleNode, 00104 const XalanDOMString& attributeName, 00105 const XPath& xpath, 00106 bool selection); 00107 00108 /** 00109 * Create an event originating at the given node of the style tree. 00110 * 00111 * @param executionContext The current execution context 00112 * @param sourceNode The source node selected. 00113 * @param styleNode The node in the style tree reference for the event 00114 * @param attributeName The attribute name where the XPath expression was supplied 00115 * @param xpath The XPath instance executed 00116 * @param selection The result of evaluating the XPath 00117 * 00118 */ 00119 SelectionEvent( 00120 StylesheetExecutionContext& executionContext, 00121 const XalanNode* sourceNode, 00122 const ElemTemplateElement& styleNode, 00123 const XalanDOMString& attributeName, 00124 const XPath& xpath, 00125 const NodeRefListBase& selection); 00126 00127 virtual 00128 ~SelectionEvent(); 00129 00130 enum eSelectionType { eNone, eBoolean, eNodeSet, eUnknown }; 00131 00132 /** 00133 * The executionContext instance. 00134 */ 00135 const StylesheetExecutionContext& m_executionContext; 00136 00137 /** 00138 * The current context node. 00139 */ 00140 const XalanNode* m_sourceNode; 00141 00142 /** 00143 * The node in the style tree where the event occurs. 00144 */ 00145 const ElemTemplateElement& m_styleNode; 00146 00147 /** 00148 * The attribute name from which the selection is made. 00149 */ 00150 const XalanDOMString& m_attributeName; 00151 00152 /** 00153 * The XPath expression evaluated. 00154 */ 00155 const XalanDOMString& m_xpathExpression; 00156 00157 /** 00158 * The result of the selection. If it's null, m_sourceNode 00159 * was selected, or some specific type was selected. See 00160 * the above enums. 00161 */ 00162 const XObjectPtr m_selection; 00163 00164 /** 00165 * The type of the selection. 00166 */ 00167 const eSelectionType m_type; 00168 00169 bool m_boolean; 00170 00171 const NodeRefListBase* const m_nodeList; 00172 00173 private: 00174 00175 // Unimplemented... 00176 SelectionEvent& 00177 operator=(const SelectionEvent& other); 00178 }; 00179 00180 00181 00182 XALAN_CPP_NAMESPACE_END 00183 00184 00185 00186 #endif //XALAN_SelectionEvent_HEADER_GUARD
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|