net.sf.saxon.event
Class ReceivingContentHandler
public
class
ReceivingContentHandler
extends Object
implements ContentHandler, LexicalHandler, DTDHandler, SaxonLocator
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.
Author: Michael H. Kay
Method Summary |
void | characters(char[] ch, int start, int length)
Callback interface for SAX: not for application use |
void | comment(char[] ch, int start, int length)
Callback interface for SAX (part of LexicalHandler interface): not for application use |
void | endCDATA() |
void | endDocument()
Callback interface for SAX: not for application use |
void | endDTD()
Register the end of the DTD. |
void | endElement(String uri, String localname, String rawname)
Callback interface for SAX: not for application use |
void | endEntity(String name) |
void | endPrefixMapping(String prefix)
Callback interface for SAX: not for application use |
int | getColumnNumber()
Return the character position where the current document event ends. |
Configuration | getConfiguration() |
int | getLineNumber()
Return the line number where the current document event ends. |
int | getLineNumber(int locationId) |
PipelineConfiguration | getPipelineConfiguration() |
String | getPublicId()
Return the public identifier for the current document event. |
String | getSystemId()
Return the public identifier for the current document event. |
String | getSystemId(int locationId) |
void | ignorableWhitespace(char[] ch, int start, int length)
Callback interface for SAX: not for application use |
boolean | isIgnoringIgnorableWhitespace()
Determine whether "ignorable whitespace" is ignored. |
void | notationDecl(String name, String publicId, String systemId) |
void | processingInstruction(String name, String remainder)
Callback interface for SAX: not for application use
|
void | reset()
Set the ReceivingContentHandler to its initial state, except for the local name cache,
which is retained |
void | setDocumentLocator(Locator locator)
Callback interface for SAX: not for application use |
void | setIgnoreIgnorableWhitespace(boolean ignore)
Set whether "ignorable whitespace" should be ignored. |
void | setPipelineConfiguration(PipelineConfiguration pipe) |
void | setReceiver(Receiver e) |
void | skippedEntity(String name) |
void | startCDATA() |
void | startDocument()
Callback interface for SAX: not for application use |
void | startDTD(String name, String publicId, String systemId)
Register the start of the DTD. |
void | startElement(String uri, String localname, String rawname, Attributes atts)
Callback interface for SAX: not for application use |
void | startEntity(String name) |
void | startPrefixMapping(String prefix, String uri)
Callback interface for SAX: not for application use |
void | unparsedEntityDecl(String name, String publicId, String systemId, String notationName) |
public ReceivingContentHandler()
create a ReceivingContentHandler and initialise variables
public void characters(char[] ch, int start, int length)
Callback interface for SAX: not for application use
public void comment(char[] ch, int start, int length)
Callback interface for SAX (part of LexicalHandler interface): not for application use
public void endCDATA()
public void endDocument()
Callback interface for SAX: not for application use
public void endDTD()
Register the end of the DTD. Comments in the DTD are skipped because they
are not part of the XPath data model
public void endElement(String uri, String localname, String rawname)
Callback interface for SAX: not for application use
public void endEntity(String name)
public void endPrefixMapping(String prefix)
Callback interface for SAX: not for application use
public int getColumnNumber()
Return the character position where the current document event ends.
Returns: The column number, or -1 if none is available.
public int getLineNumber()
Return the line number where the current document event ends.
Returns: The line number, or -1 if none is available.
public int getLineNumber(int locationId)
public String getPublicId()
Return the public identifier for the current document event.
Returns: A string containing the public identifier, or
null if none is available.
public String getSystemId()
Return the public identifier for the current document event.
Returns: A string containing the system identifier, or
null if none is available.
public String getSystemId(int locationId)
public void ignorableWhitespace(char[] ch, int start, int length)
Callback interface for SAX: not for application use
public boolean isIgnoringIgnorableWhitespace()
Determine whether "ignorable whitespace" is ignored. This returns the value that was set
using
ReceivingContentHandler if that has been called; otherwise the value
from the configuration.
public void notationDecl(String name, String publicId, String systemId)
public void processingInstruction(String name, String remainder)
Callback interface for SAX: not for application use
public void reset()
Set the ReceivingContentHandler to its initial state, except for the local name cache,
which is retained
public void setDocumentLocator(Locator locator)
Callback interface for SAX: not for application use
public void setIgnoreIgnorableWhitespace(boolean ignore)
Set whether "ignorable whitespace" should be ignored. This method is effective only
if called after setPipelineConfiguration, since the default value is taken from the
configuration.
public void skippedEntity(String name)
public void startCDATA()
public void startDocument()
Callback interface for SAX: not for application use
public void startDTD(String name, String publicId, String systemId)
Register the start of the DTD. Comments in the DTD are skipped because they
are not part of the XPath data model
public void startElement(String uri, String localname, String rawname, Attributes atts)
Callback interface for SAX: not for application use
public void startEntity(String name)
public void startPrefixMapping(String prefix, String uri)
Callback interface for SAX: not for application use
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)