Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

ElemTemplate.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(XALAN_ELEMTEMPLATE_HEADER_GUARD)
17 #define XALAN_ELEMTEMPLATE_HEADER_GUARD
18 
19 
20 
21 // Base include file. Must be first.
22 #include "XSLTDefinitions.hpp"
23 
24 // Base class header file.
25 #include "ElemTemplateElement.hpp"
26 
27 
28 
30 
31 
32 
33 XALAN_CPP_NAMESPACE_BEGIN
34 
35 
36 
37 class XPath;
38 
39 
40 
42 {
43 public:
44 
46 
57  StylesheetConstructionContext& constructionContext,
58  Stylesheet& stylesheetTree,
59  const AttributeListType& atts,
60  int lineNumber,
61  int columnNumber);
62 
63  virtual
64  ~ElemTemplate();
65 
71  const XalanQName&
72  getMode() const
73  {
74  assert(m_mode != 0);
75 
76  return *m_mode;
77  }
78 
84  const XPath*
86  {
87  return m_matchPattern;
88  }
89 
95  double
96  getPriority() const
97  {
98  return m_priority;
99  }
100 
101  virtual const XalanQName&
102  getNameAttribute() const;
103 
104  virtual void
106  StylesheetConstructionContext& constructionContext,
107  Stylesheet& theStylesheet);
108 
109  virtual const XalanDOMString&
110  getElementName() const;
111 
112  // These methods are inherited from ElemTemplateElement ...
113 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
114  virtual const ElemTemplateElement*
115  startElement(StylesheetExecutionContext& executionContext) const;
116 
117  virtual void
118  endElement(StylesheetExecutionContext& executionContext) const;
119 
120  virtual const ElemTemplateElement*
121  getInvoker(StylesheetExecutionContext& executionContext) const;
122 #else
123  virtual void
124  execute(StylesheetExecutionContext& executionContext) const;
125 
126  virtual void
127  executeChildren(StylesheetExecutionContext& executionContext) const;
128 
129  virtual void
131  StylesheetExecutionContext& executionContext,
132  XalanNode* sourceNode) const;
133  void
134  executeAsNamed(StylesheetExecutionContext& executionContext) const
135  {
136  ParentType::executeChildren(executionContext);
137  }
138 #endif
139 
140  virtual const XPath*
141  getXPath(unsigned int index = 0) const;
142 
143 protected:
144 
145  virtual bool
146  childTypeAllowed(int xslToken) const;
147 
148 private:
149 
150  // not implemented
151  ElemTemplate(const ElemTemplate&);
152 
153  ElemTemplate&
154  operator=(const ElemTemplate&);
155 
156  // Data members...
157  const XPath* m_matchPattern;
158 
159  const XalanQName* m_name;
160  const XalanQName* m_mode;
161 
162  double m_priority;
163 };
164 
165 
166 
167 XALAN_CPP_NAMESPACE_END
168 
169 
170 
171 #endif // XALAN_ELEMTEMPLATE_HEADER_GUARD
Definition: XalanNode.hpp:44
Definition: ElemTemplate.hpp:41
XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
Definition: AttributeListImpl.hpp:39
virtual void addToStylesheet(StylesheetConstructionContext &constructionContext, Stylesheet &theStylesheet)
Called during compilation when an instance is not parented by another element, and thus...
Definition: ElemTemplateElement.hpp:74
virtual void endElement(StylesheetExecutionContext &executionContext) const
Completes "post-processing" afer any sub-elements are invoked (i.e.
virtual ~ElemTemplate()
virtual const XalanDOMString & getElementName() const
Get a string for the name of the element.
Definition: StylesheetExecutionContext.hpp:104
ElemTemplateElement ParentType
Definition: ElemTemplate.hpp:45
Definition: XPath.hpp:62
virtual const XPath * getXPath(unsigned int index=0) const
Get XPath pattern/expression of one of the element atribute.
ElemTemplate(StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, const AttributeListType &atts, int lineNumber, int columnNumber)
Construct an object corresponding to an "xsl:template" element.
virtual bool childTypeAllowed(int xslToken) const
Given an xsl token type, determine whether or not a child of that type is allowed.
double getPriority() const
Retrieve the priority of element.
Definition: ElemTemplate.hpp:96
virtual void executeChildren(StylesheetExecutionContext &executionContext) const
Execute the children of this element.
virtual const ElemTemplateElement * getInvoker(StylesheetExecutionContext &executionContext) const
Returns the element that invoked this element.
virtual const XalanQName & getNameAttribute() const
Get the QName associated with any name attribute of this element.
Definition: XalanDOMString.hpp:42
const XPath * getMatchPattern() const
Retrieve the match pattern.
Definition: ElemTemplate.hpp:85
Definition: StylesheetConstructionContext.hpp:73
virtual void execute(StylesheetExecutionContext &executionContext) const
Execute the element.
virtual const ElemTemplateElement * startElement(StylesheetExecutionContext &executionContext) const
Completes "pre-processing" before any sub-elements are invoked (i.e.
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:84
Class to represent a qualified name: "The name of an internal XSLT object, specifically a named templ...
Definition: XalanQName.hpp:68
const XalanQName & getMode() const
Retrieve the mode of element.
Definition: ElemTemplate.hpp:72

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo