Xalan-C++ API Reference 1.12.0
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.
33
34
35
36namespace XALAN_CPP_NAMESPACE {
37
38
39
41{
42public:
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 */
62 const XalanDOMChar* ch,
65 bool fPreserveSpace,
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&
101
102#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
103 virtual const ElemTemplateElement*
105#else
106 virtual void
108#endif
109
110private:
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}
127
128
129
130#endif // XALAN_ELEMTEXTLITERAL_HEADER_GUARD
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
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.
const XalanDOMChar * getText() const
XalanDOMString::size_type getLength() const
virtual const ElemTemplateElement * startElement(StylesheetExecutionContext &executionContext) const
Completes "pre-processing" before any sub-elements are invoked (i.e.
virtual const XalanDOMString & getElementName() const
Get a string for the name of the element.
bool isPreserveSpace() const
Determine if whitespace should be preserved within the element.
virtual bool isWhitespace() const
Tell if the element will generate text which is XML whitespace.
This class represents the base stylesheet or an "import" stylesheet.