Xalan-C++ API Reference  1.12.0
Public Types | Public Member Functions | Public Attributes | List of all members
xalanc::GenerateEvent Class Reference

This is the class for events generated by the XSL processor after it generates a new node in the result tree. More...

#include <xalanc/XSLT/GenerateEvent.hpp>

Collaboration diagram for xalanc::GenerateEvent:
[legend]

Public Types

enum  EventType {
  EVENTTYPE_STARTDOCUMENT = 1, EVENTTYPE_ENDDOCUMENT = 2, EVENTTYPE_STARTELEMENT = 3, EVENTTYPE_ENDELEMENT = 4,
  EVENTTYPE_CHARACTERS = 5, EVENTTYPE_IGNORABLEWHITESPACE = 6, EVENTTYPE_PI = 7, EVENTTYPE_COMMENT = 8,
  EVENTTYPE_ENTITYREF = 9, EVENTTYPE_CDATA = 10
}
 

Public Member Functions

 GenerateEvent (EventType eventType, MemoryManager &theManager)
 Constructor for startDocument, endDocument events. More...
 
 GenerateEvent (EventType eventType, MemoryManager &theManager, const XalanDOMChar *name, AttributeListType *atts)
 Constructor for startElement, endElement events. More...
 
 GenerateEvent (EventType eventType, MemoryManager &theManager, const XalanDOMString &name, const AttributeListType *atts=0)
 Constructor for startElement, endElement events. More...
 
 GenerateEvent (EventType eventType, MemoryManager &theManager, const XalanDOMChar *ch, XalanDOMString::size_type start, XalanDOMString::size_type length)
 Constructor for characters, cdate events. More...
 
 GenerateEvent (EventType eventType, MemoryManager &theManager, const XalanDOMChar *name, const XalanDOMChar *data)
 Constructor for processingInstruction events. More...
 
 GenerateEvent (EventType eventType, MemoryManager &theManager, const XalanDOMChar *data)
 Constructor for comment and entity ref events. More...
 

Public Attributes

EventType m_eventType
 The type of SAX event that was generated, as enumerated in the EVENTTYPE_XXX constants above. More...
 
XalanDOMString m_characters
 Character data from a character or cdata event. More...
 
XalanDOMString::size_type m_start
 The start position of the current data in m_characters. More...
 
XalanDOMString::size_type m_length
 The length of the current data in m_characters. More...
 
XalanDOMString m_name
 The name of the element or PI. More...
 
XalanDOMString m_data
 The string data in the element (comments and PIs). More...
 
const AttributeListTypem_pAtts
 The current attribute list. More...
 

Detailed Description

This is the class for events generated by the XSL processor after it generates a new node in the result tree.

It responds to, and so is modeled from, the SAX events that are sent to the FormatterListener classes.

See also
org.apache.xml.xpath4j.xml.FormatterListener

Definition at line 55 of file GenerateEvent.hpp.

Member Enumeration Documentation

◆ EventType

Enumerator
EVENTTYPE_STARTDOCUMENT 

Event type generated when a document begins.

EVENTTYPE_ENDDOCUMENT 

Event type generated when a document ends.

EVENTTYPE_STARTELEMENT 

Event type generated when an element begins (after the attributes have been processed but before the children have been added).

EVENTTYPE_ENDELEMENT 

Event type generated when an element ends, after it's children have been added.

EVENTTYPE_CHARACTERS 

Event type generated for character data (CDATA and Ignorable Whitespace have their own events).

EVENTTYPE_IGNORABLEWHITESPACE 

Event type generated for ignorable whitespace (I'm not sure how much this is actually called.

EVENTTYPE_PI 

Event type generated for processing instructions.

EVENTTYPE_COMMENT 

Event type generated after a comment has been added.

EVENTTYPE_ENTITYREF 

Event type generate after an entity ref is created.

EVENTTYPE_CDATA 

Event type generated after CDATA is generated.

Definition at line 59 of file GenerateEvent.hpp.

Constructor & Destructor Documentation

◆ GenerateEvent() [1/6]

xalanc::GenerateEvent::GenerateEvent ( EventType  eventType,
MemoryManager &  theManager 
)

Constructor for startDocument, endDocument events.

Parameters
eventTypeone of the EVENTTYPE_XXX constants

◆ GenerateEvent() [2/6]

xalanc::GenerateEvent::GenerateEvent ( EventType  eventType,
MemoryManager &  theManager,
const XalanDOMChar *  name,
AttributeListType atts 
)

Constructor for startElement, endElement events.

Parameters
eventTypeone of the EVENTTYPE_XXX constants
namename of the element
attsSAX attribute list

◆ GenerateEvent() [3/6]

xalanc::GenerateEvent::GenerateEvent ( EventType  eventType,
MemoryManager &  theManager,
const XalanDOMString name,
const AttributeListType atts = 0 
)

Constructor for startElement, endElement events.

Parameters
eventTypeone of the EVENTTYPE_XXX constants
namename of the element
attsSAX attribute list

◆ GenerateEvent() [4/6]

xalanc::GenerateEvent::GenerateEvent ( EventType  eventType,
MemoryManager &  theManager,
const XalanDOMChar *  ch,
XalanDOMString::size_type  start,
XalanDOMString::size_type  length 
)

Constructor for characters, cdate events.

Parameters
eventTypeone of the EVENTTYPE_XXX constants
chchar array from the SAX event
startstart offset to be used in the char array
lengthend offset to be used in the chara array

◆ GenerateEvent() [5/6]

xalanc::GenerateEvent::GenerateEvent ( EventType  eventType,
MemoryManager &  theManager,
const XalanDOMChar *  name,
const XalanDOMChar *  data 
)

Constructor for processingInstruction events.

Parameters
eventTypeone of the EVENTTYPE_XXX constants
namename of the processing instruction
dataprocessing instruction data

◆ GenerateEvent() [6/6]

xalanc::GenerateEvent::GenerateEvent ( EventType  eventType,
MemoryManager &  theManager,
const XalanDOMChar *  data 
)

Constructor for comment and entity ref events.

Parameters
processorXSLT processor instance
eventTypeone of the EVENTTYPE_XXX constants
datacomment or entity ref data

Member Data Documentation

◆ m_characters

XalanDOMString xalanc::GenerateEvent::m_characters

Character data from a character or cdata event.

Definition at line 197 of file GenerateEvent.hpp.

◆ m_data

XalanDOMString xalanc::GenerateEvent::m_data

The string data in the element (comments and PIs).

Definition at line 217 of file GenerateEvent.hpp.

◆ m_eventType

EventType xalanc::GenerateEvent::m_eventType

The type of SAX event that was generated, as enumerated in the EVENTTYPE_XXX constants above.

Definition at line 192 of file GenerateEvent.hpp.

◆ m_length

XalanDOMString::size_type xalanc::GenerateEvent::m_length

The length of the current data in m_characters.

Definition at line 207 of file GenerateEvent.hpp.

◆ m_name

XalanDOMString xalanc::GenerateEvent::m_name

The name of the element or PI.

Definition at line 212 of file GenerateEvent.hpp.

◆ m_pAtts

const AttributeListType* xalanc::GenerateEvent::m_pAtts

The current attribute list.

Definition at line 222 of file GenerateEvent.hpp.

◆ m_start

XalanDOMString::size_type xalanc::GenerateEvent::m_start

The start position of the current data in m_characters.

Definition at line 202 of file GenerateEvent.hpp.


The documentation for this class was generated from the following file: