public class ReceivingContentHandler extends Object implements ContentHandler, LexicalHandler, DTDHandler
The class was previously named ContentEmitter.
If the input stream contains the processing instructions assigned by JAXP to switch disable-output-escaping on or off, these will be reflected in properties set in the corresponding characters events. In this case adjacent text nodes will not be combined.
Constructor and Description |
---|
ReceivingContentHandler()
Create a ReceivingContentHandler and initialise variables
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Report character data.
|
void |
comment(char[] ch,
int start,
int length)
Notify the existence of a comment.
|
void |
endCDATA() |
void |
endDocument()
Receive notification of the end of a document
|
void |
endDTD()
Register the end of the DTD.
|
void |
endElement(String uri,
String localname,
String rawname)
Report the end of an element (the close tag)
|
void |
endEntity(String name) |
void |
endPrefixMapping(String prefix)
Notify that a namespace binding is going out of scope
|
Configuration |
getConfiguration()
Get the Configuration object
|
PipelineConfiguration |
getPipelineConfiguration()
Get the pipeline configuration
|
Receiver |
getReceiver()
Get the receiver to which events are passed.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Report character data classified as "Ignorable whitespace", that is, whitespace text nodes
appearing as children of elements with an element-only content model
|
boolean |
isIgnoringIgnorableWhitespace()
Determine whether "ignorable whitespace" is ignored.
|
void |
notationDecl(String name,
String publicId,
String systemId) |
void |
processingInstruction(String name,
String remainder)
Notify the existence of a processing instruction
|
void |
reset()
Set the ReceivingContentHandler to its initial state, except for the local name cache,
which is retained
|
void |
setDocumentLocator(Locator locator)
Supply a locator that can be called to give information about location in the source document
being parsed.
|
void |
setIgnoreIgnorableWhitespace(boolean ignore)
Set whether "ignorable whitespace" should be ignored.
|
void |
setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipeline configuration
|
void |
setReceiver(Receiver receiver)
Set the receiver to which events are passed.
|
void |
skippedEntity(String name)
Notify a skipped entity.
|
void |
startCDATA() |
void |
startDocument()
Receive notification of the beginning of a document.
|
void |
startDTD(String name,
String publicId,
String systemId)
Register the start of the DTD.
|
void |
startElement(String uri,
String localname,
String rawname,
Attributes atts)
Notify an element start event, including all the associated attributes
|
void |
startEntity(String name) |
void |
startPrefixMapping(String prefix,
String uri)
Notify a namespace prefix to URI binding
|
void |
unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName) |
public ReceivingContentHandler()
public void reset()
public void setReceiver(Receiver receiver)
receiver
- the Receiver of eventspublic Receiver getReceiver()
public void setPipelineConfiguration(PipelineConfiguration pipe)
pipe
- the pipeline configuration. This holds a reference to the Saxon configuration, as well as
information that can vary from one pipeline to anotherpublic PipelineConfiguration getPipelineConfiguration()
setPipelineConfiguration(PipelineConfiguration)
public Configuration getConfiguration()
public void setIgnoreIgnorableWhitespace(boolean ignore)
ignore
- true if ignorable whitespace (whitespace in element content that is notified
via the ignorableWhitespace(char[], int, int)
method) should be ignored, false if
it should be treated as ordinary text.public boolean isIgnoringIgnorableWhitespace()
setIgnoreIgnorableWhitespace(boolean)
if that has been called; otherwise the value
from the configuration.public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void startElement(String uri, String localname, String rawname, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String uri, String localname, String rawname) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String name, String remainder) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void comment(char[] ch, int start, int length) throws SAXException
comment
in interface LexicalHandler
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public void startDTD(String name, String publicId, String systemId) throws SAXException
startDTD
in interface LexicalHandler
SAXException
public void endDTD() throws SAXException
endDTD
in interface LexicalHandler
SAXException
public void startEntity(String name) throws SAXException
startEntity
in interface LexicalHandler
SAXException
public void endEntity(String name) throws SAXException
endEntity
in interface LexicalHandler
SAXException
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
SAXException
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
SAXException
public void notationDecl(String name, String publicId, String systemId) throws SAXException
notationDecl
in interface DTDHandler
SAXException
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
unparsedEntityDecl
in interface DTDHandler
SAXException
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.