public abstract class BinaryEmitter extends Emitter
allCharactersEncodable, characterSet, outputProperties, outputStream, streamResult, writer
pipelineConfiguration, previousAtomic, systemId
Constructor and Description |
---|
BinaryEmitter() |
Modifier and Type | Method and Description |
---|---|
void |
characters(java.lang.CharSequence chars,
Location locationId,
int properties)
Notify character data.
|
void |
comment(java.lang.CharSequence content,
Location locationId,
int properties)
Notify a comment.
|
void |
endDocument()
Notify the end of a document node
|
void |
endElement()
Notify the end of an element.
|
void |
open()
Start the output process
|
void |
processingInstruction(java.lang.String name,
java.lang.CharSequence data,
Location locationId,
int properties)
Output a processing instruction
|
void |
startDocument(int properties)
Notify the start of a document node
|
void |
startElement(NodeName elemName,
SchemaType type,
AttributeMap attributes,
NamespaceMap namespaces,
Location location,
int properties)
Notify the start of an element
|
protected abstract byte[] |
textNodeToBinary(java.lang.CharSequence chars) |
boolean |
usesTypeAnnotations()
Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations
supplied on element and attribute events
|
boolean |
usesWriter()
Determine whether the Emitter wants a Writer for character output or
an OutputStream for binary output.
|
append, close, getOutputProperties, getOutputStream, getWriter, makeOutputStream, makeWriter, setOutputProperties, setOutputStream, setStreamResult, setUnparsedEntity, setWriter
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getNamePool, getPipelineConfiguration, getSystemId, handlesAppend, setPipelineConfiguration, setSystemId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, getPipelineConfiguration, handlesAppend, setPipelineConfiguration, setSystemId
public boolean usesWriter()
usesWriter
in class Emitter
public void open() throws XPathException
SequenceReceiver
open
in interface Receiver
open
in class SequenceReceiver
XPathException
- if an error occurspublic void startDocument(int properties) throws XPathException
Receiver
properties
- bit-significant integer indicating properties of the document node.
The definitions of the bits are in class ReceiverOption
XPathException
- if an error occurspublic void endDocument() throws XPathException
Receiver
XPathException
- if an error occurspublic void startElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException
Receiver
elemName
- the name of the element.type
- the type annotation of the element.attributes
- the attributes of this elementnamespaces
- the in-scope namespaces of this element: generally this is all the in-scope
namespaces, without relying on inheriting namespaces from parent elementslocation
- an object providing information about the module, line, and column where the node originatedproperties
- bit-significant properties of the element node. If there are no relevant
properties, zero is supplied. The definitions of the bits are in class ReceiverOption
XPathException
- if an error occurspublic void endElement() throws XPathException
Receiver
XPathException
- if an error occurspublic void characters(java.lang.CharSequence chars, Location locationId, int properties) throws XPathException
Receiver
chars
- The characterslocationId
- provides information such as line number and system ID.properties
- Bit significant value. The following bits are defined:
XPathException
- if an error occursprotected abstract byte[] textNodeToBinary(java.lang.CharSequence chars) throws XPathException
XPathException
public void processingInstruction(java.lang.String name, java.lang.CharSequence data, Location locationId, int properties) throws XPathException
Receiver
name
- The PI name. This must be a legal name (it will not be checked).data
- The data portion of the processing instructionlocationId
- provides information such as line number and system ID.properties
- Additional information about the PI.XPathException
- if an error occurspublic void comment(java.lang.CharSequence content, Location locationId, int properties) throws XPathException
Receiver
content
- The content of the commentlocationId
- provides information such as line number and system ID.properties
- Additional information about the comment.XPathException
- if an error occurspublic boolean usesTypeAnnotations()
Emitter
usesTypeAnnotations
in interface Receiver
usesTypeAnnotations
in class Emitter
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.