|
Qizx/open API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An abstract "XML Event" handler.
Conceptually similar to SAX, but better adapted to the XQuery Data Model.
An Event is in short: Document start/end, Element start/end, Attribute node, Namespace node, Text node, PI node, Comment node, other atomic node.
Used for serialization or any kind of tree construction or transformation, in particular "push" style evaluation of XQuery constructors.
All event methods begin with "ev" to avoid clashes with SAX.
Method Summary | |
void |
abort()
Signals an error in the event flow. |
void |
definePrefixHints(NSPrefixMapping prefixes)
Optional: defines a preferred prefix/namespace mapping for serialization. |
void |
evAtom(java.lang.Object value)
A special atom with any value (serializable). |
void |
evAtomText(java.lang.String value)
Text of an atom. |
void |
evAttribute(QName name,
java.lang.String value)
Adds an attribute on the current element. |
void |
evComment(java.lang.String value)
A comment node. |
void |
evDocumentEnd()
Ends a document. |
boolean |
evDocumentStart()
Starts a document. |
void |
evDTD(java.lang.String name,
java.lang.String publicID,
java.lang.String systemID)
DTD definition. |
void |
evElementEnd(QName name)
Ends an element. |
void |
evElementStart(QName name)
Starts an element. |
void |
evNamespace(java.lang.String prefix,
java.lang.String uri)
Adds a namespace node on the current element. |
void |
evPI(java.lang.String target,
java.lang.String value)
A processing-instruction node. |
void |
evText(java.lang.String value)
Text chunk inside an element. |
void |
noSpace()
Indicates when evAtomText() must not insert space. |
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 |
terminate()
Terminates a document or simple subtree. |
void |
traverse(int flags,
FONIDocument document,
int nodeId)
Convenience method: traverses and generates a FONI document using this receiver. |
void |
traverse(int flags,
Node node)
Convenience method: traverses and generates a subtree into this receiver. |
Method Detail |
public void reset()
The general contract is to put the handler in a clean state before event generation, for example clearing the previously built tree in a DOMBuilder.
public void terminate() throws DataModelException
DataModelException
public void abort() throws DataModelException
DataModelException
public boolean evDocumentStart() throws DataModelException
Not called when only a fragment is generated.
DataModelException
public void evDTD(java.lang.String name, java.lang.String publicID, java.lang.String systemID) throws DataModelException
DataModelException
public void evDocumentEnd() throws DataModelException
DataModelException
public void evElementStart(QName name) throws DataModelException
DataModelException
public void evNamespace(java.lang.String prefix, java.lang.String uri) throws DataModelException
DataModelException
public void evAttribute(QName name, java.lang.String value) throws DataModelException
DataModelException
public void evElementEnd(QName name) throws DataModelException
DataModelException
public void evText(java.lang.String value) throws DataModelException
DataModelException
public void evAtomText(java.lang.String value) throws DataModelException
DataModelException
public void noSpace()
public void evPI(java.lang.String target, java.lang.String value) throws DataModelException
DataModelException
public void evComment(java.lang.String value) throws DataModelException
DataModelException
public void evAtom(java.lang.Object value) throws DataModelException
DataModelException
public void traverse(int flags, Node node) throws DataModelException
flags
- a combination of flags of StaticContext
if true, copy all in-scope namespace nodes (not only
those defined on the node itself). A false value is generally used.
DataModelException
public void traverse(int flags, FONIDocument document, int nodeId) throws DataModelException
DataModelException
public java.lang.String resolvePrefix(java.lang.String prefix)
public void definePrefixHints(NSPrefixMapping prefixes)
|
© 2005 Axyana Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |