Xalan-C++ API Reference 1.12.0
ElemTemplate.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(XALAN_ELEMTEMPLATE_HEADER_GUARD)
19#define XALAN_ELEMTEMPLATE_HEADER_GUARD
20
21
22
23// Base include file. Must be first.
24#include "XSLTDefinitions.hpp"
25
26// Base class header file.
28
29
30
32
33
34
35namespace XALAN_CPP_NAMESPACE {
36
37
38
39class XPath;
40
41
42
44{
45public:
46
48
49 /**
50 * Construct an object corresponding to an "xsl:template" element
51 *
52 * @param constructionContext context for construction of object
53 * @param stylesheetTree stylesheet containing element
54 * @param atts list of attributes for element
55 * @param lineNumber line number in document
56 * @param columnNumber column number in document
57 */
64
65 virtual
67
68 /**
69 * Retrieve the mode of element
70 *
71 * @return QName for mode
72 */
73 const XalanQName&
74 getMode() const
75 {
76 assert(m_mode != 0);
77
78 return *m_mode;
79 }
80
81 /**
82 * Retrieve the match pattern
83 *
84 * @return XPath corresponding to the match pattern
85 */
86 const XPath*
88 {
89 return m_matchPattern;
90 }
91
92 /**
93 * Retrieve the priority of element
94 *
95 * @return priority value
96 */
97 double
99 {
100 return m_priority;
101 }
102
103 virtual const XalanQName&
105
106 virtual void
110
111 virtual const XalanDOMString&
113
114 // These methods are inherited from ElemTemplateElement ...
115#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
116 virtual const ElemTemplateElement*
118
119 virtual void
121
122 virtual const ElemTemplateElement*
124#else
125 virtual void
127
128 virtual void
129 executeChildren(StylesheetExecutionContext& executionContext) const;
130
131 virtual void
132 executeChildren(
134 XalanNode* sourceNode) const;
135 void
137 {
138 ParentType::executeChildren(executionContext);
139 }
140#endif
141
142 virtual const XPath*
143 getXPath(XalanSize_t index) const;
144
145protected:
146
147 virtual bool
149
150private:
151
152 // not implemented
154
156 operator=(const ElemTemplate&);
157
158 // Data members...
159 const XPath* m_matchPattern;
160
161 const XalanQName* m_name;
162 const XalanQName* m_mode;
163
164 double m_priority;
165};
166
167
168
169}
170
171
172
173#endif // XALAN_ELEMTEMPLATE_HEADER_GUARD
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual const XalanQName & getNameAttribute() const
Get the QName associated with any name attribute of this element.
virtual const ElemTemplateElement * startElement(StylesheetExecutionContext &executionContext) const
Completes "pre-processing" before any sub-elements are invoked (i.e.
ElemTemplate(StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, const AttributeListType &atts, XalanFileLoc lineNumber, XalanFileLoc columnNumber)
Construct an object corresponding to an "xsl:template" element.
virtual void addToStylesheet(StylesheetConstructionContext &constructionContext, Stylesheet &theStylesheet)
Called during compilation when an instance is not parented by another element, and thus,...
virtual bool childTypeAllowed(int xslToken) const
Given an xsl token type, determine whether or not a child of that type is allowed.
virtual void endElement(StylesheetExecutionContext &executionContext) const
Completes "post-processing" afer any sub-elements are invoked (i.e.
const XalanQName & getMode() const
Retrieve the mode of element.
virtual const XalanDOMString & getElementName() const
Get a string for the name of the element.
double getPriority() const
Retrieve the priority of element.
virtual const XPath * getXPath(XalanSize_t index) const
Get XPath pattern/expression of one of the element atribute.
virtual const ElemTemplateElement * getInvoker(StylesheetExecutionContext &executionContext) const
Returns the element that invoked this element.
const XPath * getMatchPattern() const
Retrieve the match pattern.
ElemTemplateElement ParentType
This class represents the base stylesheet or an "import" stylesheet.
Class to represent a qualified name.
xercesc::AttributeList AttributeListType