|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.event.ReceivingContentHandler
public class ReceivingContentHandler
ReceivingContentHandler is a glue class that provides a standard SAX ContentHandler interface to a Saxon Receiver. To achieve this it needs to map names supplied as strings to numeric name codes, for which purpose it needs access to a name pool. The class also performs the function of assembling adjacent text nodes.
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 Summary | |
---|---|
ReceivingContentHandler()
Create a ReceivingContentHandler and initialise variables |
Method Summary | |
---|---|
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 |
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReceivingContentHandler()
Method Detail |
---|
public void reset()
public void setReceiver(Receiver receiver)
receiver
- the Receiver of eventspublic 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 another, for example the LocationProvider which resolves
the location of events in a source documentpublic 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
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |