Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


GenerateEvent.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_GenerateEvent_HEADER_GUARD)
19 #define XALAN_GenerateEvent_HEADER_GUARD
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
29 
30 
31 
32 XALAN_DECLARE_XERCES_CLASS(AttributeList)
33 
34 
35 
36 XALAN_CPP_NAMESPACE_BEGIN
37 
38 
39 
40 typedef XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType;
41 
42 
43 
44 /**
45  * This is the class for events generated by the XSL processor
46  * after it generates a new node in the result tree. It responds
47  * to, and so is modeled from, the SAX events that are sent to the
48  * FormatterListener classes.
49  *
50  * @see org.apache.xml.xpath4j.xml.FormatterListener
51  */
53 {
54 public:
55 
56  enum EventType
57  {
58  /**
59  * Event type generated when a document begins.
60  *
61  */
62  EVENTTYPE_STARTDOCUMENT = 1,
63 
64  /**
65  * Event type generated when a document ends.
66  */
67  EVENTTYPE_ENDDOCUMENT = 2,
68 
69  /**
70  * Event type generated when an element begins (after the attributes have been processed but before the children have been added).
71  */
72  EVENTTYPE_STARTELEMENT = 3,
73 
74  /**
75  * Event type generated when an element ends, after it's children have been added.
76  */
77  EVENTTYPE_ENDELEMENT = 4,
78 
79  /**
80  * Event type generated for character data (CDATA and Ignorable Whitespace have their own events).
81  */
82  EVENTTYPE_CHARACTERS = 5,
83 
84  /**
85  * Event type generated for ignorable whitespace (I'm not sure how much this is actually called.
86  */
87  EVENTTYPE_IGNORABLEWHITESPACE = 6,
88 
89  /**
90  * Event type generated for processing instructions.
91  */
92  EVENTTYPE_PI = 7,
93 
94  /**
95  * Event type generated after a comment has been added.
96  */
97  EVENTTYPE_COMMENT = 8,
98 
99  /**
100  * Event type generate after an entity ref is created.
101  */
102  EVENTTYPE_ENTITYREF = 9,
103 
104  /**
105  * Event type generated after CDATA is generated.
106  */
107  EVENTTYPE_CDATA = 10
108  };
109 
110 
111  /**
112  * Constructor for startDocument, endDocument events.
113  *
114  * @param eventType one of the EVENTTYPE_XXX constants
115  */
116  GenerateEvent(EventType eventType,
117  MemoryManager& theManager);
118 
119  /**
120  * Constructor for startElement, endElement events.
121  *
122  * @param eventType one of the EVENTTYPE_XXX constants
123  * @param name name of the element
124  * @param atts SAX attribute list
125  */
127  EventType eventType,
128  MemoryManager& theManager,
129  const XalanDOMChar* name,
130  AttributeListType* atts);
131 
132  /**
133  * Constructor for startElement, endElement events.
134  *
135  * @param eventType one of the EVENTTYPE_XXX constants
136  * @param name name of the element
137  * @param atts SAX attribute list
138  */
140  EventType eventType,
141  MemoryManager& theManager,
142  const XalanDOMString& name,
143  const AttributeListType* atts = 0);
144 
145  /**
146  * Constructor for characters, cdate events.
147  *
148  * @param eventType one of the EVENTTYPE_XXX constants
149  * @param ch char array from the SAX event
150  * @param start start offset to be used in the char array
151  * @param length end offset to be used in the chara array
152  */
154  EventType eventType,
155  MemoryManager& theManager,
156  const XalanDOMChar* ch,
159 
160  /**
161  * Constructor for processingInstruction events.
162  *
163  * @param eventType one of the EVENTTYPE_XXX constants
164  * @param name name of the processing instruction
165  * @param data processing instruction data
166  */
168  EventType eventType,
169  MemoryManager& theManager,
170  const XalanDOMChar* name,
171  const XalanDOMChar* data);
172 
173  /**
174  * Constructor for comment and entity ref events.
175  *
176  * @param processor XSLT processor instance
177  * @param eventType one of the EVENTTYPE_XXX constants
178  * @param data comment or entity ref data
179  */
181  EventType eventType,
182  MemoryManager& theManager,
183  const XalanDOMChar* data);
184 
185  /**
186  * The type of SAX event that was generated, as enumerated in the
187  * EVENTTYPE_XXX constants above.
188  */
190 
191  /**
192  * Character data from a character or cdata event.
193  */
195 
196  /**
197  * The start position of the current data in m_characters.
198  */
200 
201  /**
202  * The length of the current data in m_characters.
203  */
205 
206  /**
207  * The name of the element or PI.
208  */
210 
211  /**
212  * The string data in the element (comments and PIs).
213  */
215 
216  /**
217  * The current attribute list.
218  */
220 private:
221  // not imlplemented
222  GenerateEvent();
224 };
225 
226 
227 
228 XALAN_CPP_NAMESPACE_END
229 
230 
231 
232 #endif //XALAN_GenerateEvent_HEADER_GUARD
EventType m_eventType
The type of SAX event that was generated, as enumerated in the EVENTTYPE_XXX constants above...
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
This is the class for events generated by the XSL processor after it generates a new node in the resu...
XalanSize_t size_type
XalanDOMString::size_type m_length
The length of the current data in m_characters.
XalanDOMString m_name
The name of the element or PI.
#define XALAN_XSLT_EXPORT
XalanDOMString m_characters
Character data from a character or cdata event.
XalanDOMString::size_type m_start
The start position of the current data in m_characters.
const AttributeListType * m_pAtts
The current attribute list.
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
XalanDOMString m_data
The string data in the element (comments and PIs).

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