Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


ElemTextLiteral.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_ELEMTEXTLITERAL_HEADER_GUARD)
19 #define XALAN_ELEMTEXTLITERAL_HEADER_GUARD
20 
21 
22 // Base include file. Must be first.
23 #include "XSLTDefinitions.hpp"
24 
25 
26 
28 
29 
30 
31 // Base class header file.
32 #include "ElemTemplateElement.hpp"
33 
34 
35 
36 XALAN_CPP_NAMESPACE_BEGIN
37 
38 
39 
41 {
42 public:
43 
44  /**
45  * Construct an object corresponding to literal text element
46  *
47  * @param constructionContext context for construction of object
48  * @param stylesheetTree stylesheet containing element
49  * @param lineNumber line number in document
50  * @param columnNumber column number in document
51  * @param ch pointer to character string for element
52  * @param start starting offset of element
53  * @param length number of characters in element
54  * @param fPreserveSpace true is space should be preserved
55  * @param fDisableOutputEscaping true if output escaping should be disabled
56  */
58  StylesheetConstructionContext& constructionContext,
59  Stylesheet& stylesheetTree,
60  XalanFileLoc lineNumber,
61  XalanFileLoc columnNumber,
62  const XalanDOMChar* ch,
65  bool fPreserveSpace,
66  bool fDisableOutputEscaping);
67 
68  virtual
70 
71  /**
72  * Determine if whitespace should be preserved within the element
73  *
74  * @return true if whitespace should be preserved
75  */
76  bool
78  {
79  return preserveSpace();
80  }
81 
82  const XalanDOMChar*
83  getText() const
84  {
85  return m_ch;
86  }
87 
89  getLength() const
90  {
91  return m_length;
92  }
93 
94  virtual bool
95  isWhitespace() const;
96 
97  // These methods are inherited from ElemTemplateElement ...
98 
99  virtual const XalanDOMString&
100  getElementName() const;
101 
102 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
103  virtual const ElemTemplateElement*
104  startElement(StylesheetExecutionContext& executionContext) const;
105 #else
106  virtual void
107  execute(StylesheetExecutionContext& executionContext) const;
108 #endif
109 
110 private:
111 
112  // not implemented
114 
116  operator=(const ElemTextLiteral&);
117 
118  const bool m_isWhitespace;
119 
120  const XalanDOMChar* const m_ch;
121  const XalanDOMString::size_type m_length;
122 };
123 
124 
125 
126 XALAN_CPP_NAMESPACE_END
127 
128 
129 
130 #endif // XALAN_ELEMTEXTLITERAL_HEADER_GUARD
const XalanDOMChar * getText() const
XalanSize_t size_type
virtual bool isWhitespace() const
Tell if the element will generate text which is XML whitespace.
virtual void execute(StylesheetExecutionContext &executionContext) const
Execute the element.
bool isPreserveSpace() const
Determine if whitespace should be preserved within the element.
virtual const XalanDOMString & getElementName() const
Get a string for the name of the element.
virtual ~ElemTextLiteral()
XalanDOMString::size_type getLength() const
virtual const ElemTemplateElement * startElement(StylesheetExecutionContext &executionContext) const
Completes "pre-processing" before any sub-elements are invoked (i.e.
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:86
ElemTextLiteral(StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, XalanFileLoc lineNumber, XalanFileLoc columnNumber, const XalanDOMChar *ch, XalanDOMString::size_type start, XalanDOMString::size_type length, bool fPreserveSpace, bool fDisableOutputEscaping)
Construct an object corresponding to literal text element.

Interpreting class diagrams

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

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

Apache Logo