| API Docs for SAX and DOM |

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

# XSAnnotation Class Reference

This class describes all properties of a Schema Annotation component. More...

Inheritance diagram for XSAnnotation:

[legend]
List of all members.

## Public Types

enum | ANNOTATION_TARGET { W3C_DOM_ELEMENT = 1, W3C_DOM_DOCUMENT = 2 }

## Public Member Functions

| XSAnnotation (MemoryManager *const manager)
Constructors
| XSAnnotation (const XMLCh *const contents, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
| The default constructor.
Destructor
| ~XSAnnotation ()
XSAnnotation methods
void | writeAnnotation (DOMNode *node, ANNOTATION_TARGET targetType)
| Write contents of the annotation to the specified DOM object.
void | writeAnnotation (ContentHandler *handler)
| Write contents of the annotation to the specified object.
const XMLCh * | getAnnotationString () const
| A text representation of annotation.
XMLCh * | getAnnotationString ()
void | setNext (XSAnnotation *const nextAnnotation)
XSAnnotation * | getNext ()
void | getLineCol (int &line, int &col) const
const XMLCh * | getSystemId () const
void | setLineCol (int line, int col)
void | setSystemId (const XMLCh *const systemId)

## Protected Attributes

XMLCh * | fContents
XSAnnotation * | fNext

## Detailed Description

This class describes all properties of a Schema Annotation component.

This is *always* owned by the validator /parser object from which it is obtained.

## Member Enumeration Documentation

enum XSAnnotation::ANNOTATION_TARGET

Enumeration values:

  W3C_DOM_ELEMENT | The object type is `org.w3c.dom.Element`.
  W3C_DOM_DOCUMENT | The object type is `org.w3c.dom.Document`.

## Constructor & Destructor Documentation

XSAnnotation::XSAnnotation | ( | const XMLCh *const | contents,
|  | MemoryManager *const | manager = `XMLPlatformUtils::fgMemoryManager`
| ) |

The default constructor.

Parameters:

  | contents | The string that is to be the content of this XSAnnotation
  | manager | The configurable memory manager

XSAnnotation::~XSAnnotation | ( |  | ) |

XSAnnotation::XSAnnotation | ( | MemoryManager *const | manager | ) |

## Member Function Documentation

XMLCh * XSAnnotation::getAnnotationString | ( |  | ) |

const XMLCh * XSAnnotation::getAnnotationString | ( |  | ) | const

| A text representation of annotation.

void XSAnnotation::getLineCol | ( | int & | line,
|  | int & | col
| ) | const

XSAnnotation* XSAnnotation::getNext | ( |  | ) |

const XMLCh * XSAnnotation::getSystemId | ( |  | ) | const

void XSAnnotation::setLineCol | ( | int | line,
|  | int | col
| ) |

void XSAnnotation::setNext | ( | XSAnnotation *const | nextAnnotation | ) |

void XSAnnotation::setSystemId | ( | const XMLCh *const | systemId | ) |

void XSAnnotation::writeAnnotation | ( | ContentHandler * | handler | ) |

Write contents of the annotation to the specified object.

The corresponding events for all in-scope namespace declarations are sent via the specified document handler.

Parameters:

  | handler | A target pointer to the annotation target object, i.e. `ContentHandler`.

void XSAnnotation::writeAnnotation | ( | DOMNode * | node,
|  | ANNOTATION_TARGET | targetType
| ) |

Write contents of the annotation to the specified DOM object.

In-scope namespace declarations for `annotation` element are added as attribute nodes of the serialized `annotation`.

Parameters:

  | node | A target pointer to the annotation target object, i.e. either `DOMDocument` or `DOMElement` cast as `DOMNode`.
  | targetType | A target type.

## Member Data Documentation

XMLCh* XSAnnotation::fContents`[protected]`

XSAnnotation* XSAnnotation::fNext`[protected]`

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

- XSAnnotation.hpp

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.