## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.5

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# 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 <GenerateEvent.hpp>`

Collaboration diagram for GenerateEvent:

[legend]
List of all members.

## 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 Methods

- GenerateEvent (EventType eventType)
    Constructor for startDocument, endDocument events. More...
- GenerateEvent (EventType eventType, const XalanDOMChar *name, AttributeListType *atts)
    Constructor for startElement, endElement events. More...
- GenerateEvent (EventType eventType, const XalanDOMString &name, const AttributeListType *atts=0)
    Constructor for startElement, endElement events. More...
- GenerateEvent (EventType eventType, const XalanDOMChar *ch, XalanDOMString::size_type start, XalanDOMString::size_type length)
    Constructor for characters, cdate events. More...
- GenerateEvent (EventType eventType, const XalanDOMChar *name, const XalanDOMChar *data)
    Constructor for processingInstruction events. More...
- GenerateEvent (EventType eventType, 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 AttributeListType* m_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

## Member Enumeration Documentation

enum GenerateEvent::EventType

  | Enumeration values:
  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.

## Constructor & Destructor Documentation

GenerateEvent::GenerateEvent ( | EventType eventType )

  | Constructor for startDocument, endDocument events. Parameters:
  eventType | one of the EVENTTYPE_XXX constants

GenerateEvent::GenerateEvent ( | EventType eventType,
| const XalanDOMChar * name,
| AttributeListType * atts )

  | Constructor for startElement, endElement events. Parameters:
  eventType | one of the EVENTTYPE_XXX constants
  name | name of the element
  atts | SAX attribute list

GenerateEvent::GenerateEvent ( | EventType eventType,
| const XalanDOMString & name,
| const AttributeListType * atts = 0 )

  | Constructor for startElement, endElement events. Parameters:
  eventType | one of the EVENTTYPE_XXX constants
  name | name of the element
  atts | SAX attribute list

GenerateEvent::GenerateEvent ( | EventType eventType,
| const XalanDOMChar * ch,
| XalanDOMString::size_type start,
| XalanDOMString::size_type length )

  | Constructor for characters, cdate events. Parameters:
  eventType | one of the EVENTTYPE_XXX constants
  ch | char array from the SAX event
  start | start offset to be used in the char array
  length | end offset to be used in the chara array

GenerateEvent::GenerateEvent ( | EventType eventType,
| const XalanDOMChar * name,
| const XalanDOMChar * data )

  | Constructor for processingInstruction events. Parameters:
  eventType | one of the EVENTTYPE_XXX constants
  name | name of the processing instruction
  data | processing instruction data

GenerateEvent::GenerateEvent ( | EventType eventType,
| const XalanDOMChar * data )

  | Constructor for comment and entity ref events. Parameters:
  processor | XSLT processor instance
  eventType | one of the EVENTTYPE_XXX constants
  data | comment or entity ref data

## Member Data Documentation

XalanDOMString GenerateEvent::m_characters

| Character data from a character or cdata event.

XalanDOMString GenerateEvent::m_data

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

EventType GenerateEvent::m_eventType

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

XalanDOMString::size_type GenerateEvent::m_length

| The length of the current data in m_characters.

XalanDOMString GenerateEvent::m_name

| The name of the element or PI.

const AttributeListType * GenerateEvent::m_pAtts

| The current attribute list.

XalanDOMString::size_type GenerateEvent::m_start

| The start position of the current data in m_characters.

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

- GenerateEvent.hpp

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.5 Copyright © 2000, 2001, 2002, 2003 The Apache Software Foundation. All Rights Reserved.