Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

ElemVariable.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_ELEMVARIABLE_HEADER_GUARD)
17 #define XALAN_ELEMVARIABLE_HEADER_GUARD
18 
28 // Base include file. Must be first.
29 #include "XSLTDefinitions.hpp"
30 
31 // Base class header file.
32 #include "ElemTemplateElement.hpp"
33 
34 
35 
36 #include <xalanc/XPath/XObject.hpp>
37 
38 
39 
41 
42 
43 
44 XALAN_CPP_NAMESPACE_BEGIN
45 
46 
47 
48 class XPath;
49 
50 
51 
53 {
54 public:
55 
57 
68  StylesheetConstructionContext& constructionContext,
69  Stylesheet& stylesheetTree,
70  const AttributeListType& atts,
71  int lineNumber,
72  int columnNumber);
73 
74  virtual
75  ~ElemVariable();
76 
82  bool
83  isTopLevel() const
84  {
85  return m_isTopLevel;
86  }
87 
88  // These methods are inherited from ElemTemplateElement ...
89 
90  virtual const XalanQName&
91  getNameAttribute() const;
92 
93  virtual void
95  StylesheetConstructionContext& constructionContext,
96  Stylesheet& theStylesheet);
97 
98  virtual const XalanDOMString&
99  getElementName() const;
100 
101 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
102  const ElemTemplateElement*
103  startElement(StylesheetExecutionContext& executionContext) const;
104 
105  void
106  endElement(StylesheetExecutionContext& executionContext) const;
107 #else
108  virtual void
109  execute(StylesheetExecutionContext& executionContext) const;
110 #endif
111 
112  const XObjectPtr
113  getValue(
114  StylesheetExecutionContext& executionContext,
115  XalanNode* sourceNode) const;
116 
117  virtual void
119 
120  virtual const XPath*
121  getXPath(unsigned int index = 0) const;
122 
123 protected:
124 
134  ElemVariable(
135  StylesheetConstructionContext& constructionContext,
136  Stylesheet& stylesheetTree,
137  const AttributeListType& atts,
138  int lineNumber,
139  int columnNumber,
140  int xslToken);
141 
149  void
150  init(
151  StylesheetConstructionContext& constructionContext,
152  Stylesheet& stylesheetTree,
153  const AttributeListType& atts);
154 
155 
157 
158 private:
159 
160  // not implemented
161  ElemVariable(const ElemVariable &);
162 
163  ElemVariable&
164  operator=(const ElemVariable &);
165 
166  const XPath* m_selectPattern;
167 
168  bool m_isTopLevel;
169 
170  XObjectPtr m_value;
171 
172  XalanNode* m_varContext;
173 };
174 
175 
176 
177 XALAN_CPP_NAMESPACE_END
178 
179 
180 
181 #endif // XALAN_ELEMVARIABLE_HEADER_GUARD
Definition: ElemVariable.hpp:52
virtual ~ElemVariable()
Definition: XalanNode.hpp:44
XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
Definition: AttributeListImpl.hpp:39
Definition: ElemTemplateElement.hpp:74
virtual const XPath * getXPath(unsigned int index=0) const
Get XPath pattern/expression of one of the element atribute.
Definition: StylesheetExecutionContext.hpp:104
virtual void addToStylesheet(StylesheetConstructionContext &constructionContext, Stylesheet &theStylesheet)
Called during compilation when an instance is not parented by another element, and thus...
Class to hold XObjectPtr return types.
Definition: XObject.hpp:584
Definition: XPath.hpp:62
const XObjectPtr getValue(StylesheetExecutionContext &executionContext, XalanNode *sourceNode) const
void endElement(StylesheetExecutionContext &executionContext) const
Completes "post-processing" afer any sub-elements are invoked (i.e.
virtual const XalanDOMString & getElementName() const
Get a string for the name of the element.
ElemTemplateElement ParentType
Definition: ElemVariable.hpp:56
virtual const XalanQName & getNameAttribute() const
Get the QName associated with any name attribute of this element.
ElemVariable(StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, const AttributeListType &atts, int lineNumber, int columnNumber)
Construct an object corresponding to an "xsl:variable" element.
Definition: XalanDOMString.hpp:42
bool isTopLevel() const
Determines if this is a top level variable.
Definition: ElemVariable.hpp:83
const ElemTemplateElement * startElement(StylesheetExecutionContext &executionContext) const
Completes "pre-processing" before any sub-elements are invoked (i.e.
Definition: StylesheetConstructionContext.hpp:73
virtual void execute(StylesheetExecutionContext &executionContext) const
Execute the element.
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:84
const XalanQName * m_qname
Definition: ElemVariable.hpp:156
Class to represent a qualified name: "The name of an internal XSLT object, specifically a named templ...
Definition: XalanQName.hpp:68
void init(StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, const AttributeListType &atts)
Do common initialization.
virtual void setParentNodeElem(ElemTemplateElement *theParent)
Set the parent node.

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