org.gxml.sa
Interface GxContentHandler<A,S,T>

All Superinterfaces:
java.io.Closeable, java.io.Flushable
All Known Subinterfaces:
GxContentFilter<A,S,T>, GxFragmentBuilder<N,A,S,T>, GxSequenceFilter<A,S,T>, GxSequenceHandler<A,S,T>

public interface GxContentHandler<A,S,T>
extends java.io.Flushable, java.io.Closeable


Method Summary
 void attribute(S namespaceURI, S localName, java.lang.String prefix, java.util.List<? extends A> data, SmName<S> type)
          Receive notification of an attribute.
 void attribute(S namespaceURI, S localName, java.lang.String prefix, java.lang.String value)
          Receive notification of an attribute with an untyped value (dm:string-value).
 void comment(java.lang.String value)
          Receive notification of a comment information item.
 void endDocument()
          Receive notification of the end of a document.
 void endElement()
          Receive notification of the end of an element.
 void ignorableWhitespace(java.lang.String value)
          Receive notification of ignorable whitespace in element content.
 void namespace(java.lang.String prefix, S namespaceURI)
          Receive notification of an namespace in the style of a lexical attribute.
 void processingInstruction(java.lang.String target, java.lang.String data)
          Receive notification of a processing instruction.
 void startDocument(java.net.URI documentURI)
          Receive notification of the beginning of a document.
 void startElement(S namespaceURI, S localName, java.lang.String prefix, SmName<S> type)
          Receive notification of the beginning of an element.
 void text(java.util.List<? extends A> data)
          Receive notification of character data.
 void text(java.lang.String value)
          Receive notification of a text event with an untyped value (dm:string-value).
 
Methods inherited from interface java.io.Flushable
flush
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

attribute

void attribute(S namespaceURI,
               S localName,
               java.lang.String prefix,
               java.util.List<? extends A> data,
               SmName<S> type)
               throws GxException
Receive notification of an attribute.

Parameters:
namespaceURI - The namespace-uri part of the attribute name.
localName - The local-name part of the attribute name.
prefix - The prefix part of the attribute name.
data - The value of the attribute.
type - The type annotation for the attribute supplied by validation. May be null if not validated.
Throws:
GxException

attribute

void attribute(S namespaceURI,
               S localName,
               java.lang.String prefix,
               java.lang.String value)
               throws GxException
Receive notification of an attribute with an untyped value (dm:string-value).

Parameters:
namespaceURI - The namespace-uri part of the attribute name.
localName - The local-name part of the attribute name.
prefix - The prefix part of the attribute name.
value - The value of the attribute considered to be an xs:untypedAtomic value.
Throws:
GxException

comment

void comment(java.lang.String value)
             throws GxException
Receive notification of a comment information item.

The callee will call this method once for each comment.

Parameters:
value - The content of the comment.
Throws:
GxException

endDocument

void endDocument()
                 throws GxException
Receive notification of the end of a document.

A callee will invoke this method only once, and it will be the last method invoked.

A SAX parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

Throws:
GxException

endElement

void endElement()
                throws GxException
Receive notification of the end of an element.

A callee will invoke this method at the end of every element in the XML document; there will be a corresponding startElement core for every endElement core (even when the element is empty).

For information on the names, see startElement.

Throws:
GxException

ignorableWhitespace

void ignorableWhitespace(java.lang.String value)
                         throws GxException
Receive notification of ignorable whitespace in element content.

Validating Parsers must use this method to report each chunk of whitespace in element content (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models.

SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the textUntyped in any single core must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Parameters:
value - The textUntyped from the XML document.
Throws:
GxException

namespace

void namespace(java.lang.String prefix,
               S namespaceURI)
               throws GxException
Receive notification of an namespace in the style of a lexical attribute.
Note that the timing of the namespace event is immediately after a start element.

Parameters:
prefix - The name of the namespace node.
namespaceURI - The string value of the namespace node.
Throws:
GxException

processingInstruction

void processingInstruction(java.lang.String target,
                           java.lang.String data)
                           throws GxException
Receive notification of a processing instruction.

The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.

A SAX parser must never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.

Parameters:
target - The processing instruction target.
data - The processing instruction data, or null if none was supplied. The data does not include any whitespace separating it from the target.
Throws:
GxException

startDocument

void startDocument(java.net.URI documentURI)
                   throws GxException
Receive notification of the beginning of a document.

A callee will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).

Parameters:
documentURI - The dm:document-uri.
Throws:
GxException

startElement

void startElement(S namespaceURI,
                  S localName,
                  java.lang.String prefix,
                  SmName<S> type)
                  throws GxException
Receive notification of the beginning of an element.

A callee will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement core for every startElement core (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement core.

Parameters:
namespaceURI - The namespace-uri part of the element name.
localName - The local-name part of the element name.
prefix - The prefix part of the element name.
type - The type annotation of the element provided by validation. May be null if not validated.
Throws:
GxException

text

void text(java.util.List<? extends A> data)
          throws GxException
Receive notification of character data.

Parameters:
data - The data associated with the text node.
Throws:
GxException

text

void text(java.lang.String value)
          throws GxException
Receive notification of a text event with an untyped value (dm:string-value).


Equivalent to text(java.util.List) with an xs:untypedAtomic value.

Parameters:
value - The value of the text node considered to be an xs:untypedAtomic value.
Throws:
GxException


Copyright © 2009 TIBCO Software Inc. All Rights Reserved.