Qizx/Open v0.3

net.xfra.qizxopen.dm
Interface XMLEventReceiver

All Known Implementing Classes:
XMLEventReceiverBase

public interface XMLEventReceiver

An abstract receiver of SAX-like events.

Used for event-style evaluation of XQuery expressions.


Method Summary
 void atom(java.lang.String value)
          Emits the text of an atom.
 void attribute(QName name, java.lang.String value)
          Must follow startElement and precede any child.
 void comment(java.lang.String value)
          Emits a comment.
 void definePrefixHints(NSPrefixMapping prefixes)
          Optional: define preferred prefix->NS mapping for serialization.
 void endDocument()
          Ends a document.
 void endElement(QName name)
          Ends an element.
 void namespace(java.lang.String prefix, java.lang.String uri)
          Must follow startElement and precede any child.
 void pi(java.lang.String target, java.lang.String value)
          Emits a processing-instruction.
 void reset()
          Resets the state prior to use startDocument() or startElement().
 java.lang.String resolvePrefix(java.lang.String prefix)
          Resolves a prefix to an URI in the context of the current node.
 void startDocument()
          Starts a document.
 void startElement(QName name)
          Starts an element.
 void terminate()
          Terminates a document or simple subtree.
 void text(java.lang.String value)
          Emits a text chunk.
 void traverse(Node node, boolean inScopeNS)
          Traverses and generates a subtree into this receiver.
 

Method Detail

reset

public void reset()
Resets the state prior to use startDocument() or startElement().


terminate

public void terminate()
               throws DataModelException
Terminates a document or simple subtree. May perform consistency checks.

DataModelException

startDocument

public void startDocument()
                   throws DataModelException
Starts a document.

It is not necessarily called, if only a fragment is generated.

DataModelException

endDocument

public void endDocument()
                 throws DataModelException
Ends a document. Must be balanced by a corresponding startDocument().

DataModelException

startElement

public void startElement(QName name)
                  throws DataModelException
Starts an element. Must be balanced by a corresponding endElement().

DataModelException

namespace

public void namespace(java.lang.String prefix,
                      java.lang.String uri)
               throws DataModelException
Must follow startElement and precede any child. May be interleaved with attribute().

DataModelException

attribute

public void attribute(QName name,
                      java.lang.String value)
               throws DataModelException
Must follow startElement and precede any child. May be interleaved with namespace().

DataModelException

endElement

public void endElement(QName name)
                throws DataModelException
Ends an element. Removes NS mappings.

DataModelException

text

public void text(java.lang.String value)
          throws DataModelException
Emits a text chunk. No space before or after.

DataModelException

atom

public void atom(java.lang.String value)
          throws DataModelException
Emits the text of an atom. The difference with text() is that a space in requested between two atoms.

DataModelException

pi

public void pi(java.lang.String target,
               java.lang.String value)
        throws DataModelException
Emits a processing-instruction.

DataModelException

comment

public void comment(java.lang.String value)
             throws DataModelException
Emits a comment.

DataModelException

traverse

public void traverse(Node node,
                     boolean inScopeNS)
              throws DataModelException
Traverses and generates a subtree into this receiver.

Parameters:
inScopeNS - if true, copy all in-scope namespace nodes (not only those defined in the node itself).
DataModelException

resolvePrefix

public java.lang.String resolvePrefix(java.lang.String prefix)
Resolves a prefix to an URI in the context of the current node.

Returns:
null if the prefix cannot be resolved.

definePrefixHints

public void definePrefixHints(NSPrefixMapping prefixes)
Optional: define preferred prefix->NS mapping for serialization.


 Copyright Xavier FRANC 2003-2004