Package com.icl.saxon
Class ContentEmitter
- java.lang.Object
-
- com.icl.saxon.ContentEmitter
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,LexicalHandler
- Direct Known Subclasses:
IdentityTransformerHandler,TemplatesHandlerImpl,TransformerHandlerImpl
public class ContentEmitter extends Object implements ContentHandler, LexicalHandler, DTDHandler
ContentEmitter is a glue class that provides a standard SAX ContentHandler interface to a Saxon Emitter. 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.
-
-
Constructor Summary
Constructors Constructor Description ContentEmitter()create a ContentEmitter and initialise variables
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)Callback interface for SAX: not for application usevoidcomment(char[] ch, int start, int length)Callback interface for SAX (part of LexicalHandler interface): not for application usevoidendCDATA()voidendDocument()Callback interface for SAX: not for application usevoidendDTD()Register the end of the DTD.voidendElement(String uri, String localname, String rawname)Callback interface for SAX: not for application usevoidendEntity(String name)voidendPrefixMapping(String prefix)Callback interface for SAX: not for application usevoidignorableWhitespace(char[] ch, int start, int length)Callback interface for SAX: not for application usevoidnotationDecl(String name, String publicId, String systemId)voidprocessingInstruction(String name, String remainder)Callback interface for SAX: not for application usevoidsetDocumentLocator(Locator locator)Callback interface for SAX: not for application usevoidsetEmitter(Emitter e)voidsetNamePool(NamePool namePool)voidskippedEntity(String name)voidstartCDATA()voidstartDocument()Callback interface for SAX: not for application usevoidstartDTD(String name, String publicId, String systemId)Register the start of the DTD.voidstartElement(String uri, String localname, String rawname, Attributes atts)Callback interface for SAX: not for application usevoidstartEntity(String name)voidstartPrefixMapping(String prefix, String uri)Callback interface for SAX: not for application usevoidunparsedEntityDecl(String name, String publicId, String systemId, String notationName)
-
-
-
Method Detail
-
setEmitter
public void setEmitter(Emitter e)
-
setNamePool
public void setNamePool(NamePool namePool)
-
startDocument
public void startDocument() throws SAXExceptionCallback interface for SAX: not for application use- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXExceptionCallback interface for SAX: not for application use- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
Callback interface for SAX: not for application use- Specified by:
setDocumentLocatorin interfaceContentHandler
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri)
Callback interface for SAX: not for application use- Specified by:
startPrefixMappingin interfaceContentHandler
-
endPrefixMapping
public void endPrefixMapping(String prefix)
Callback interface for SAX: not for application use- Specified by:
endPrefixMappingin interfaceContentHandler
-
startElement
public void startElement(String uri, String localname, String rawname, Attributes atts) throws SAXException
Callback interface for SAX: not for application use- Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localname, String rawname) throws SAXException
Callback interface for SAX: not for application use- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length)Callback interface for SAX: not for application use- Specified by:
charactersin interfaceContentHandler
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length)Callback interface for SAX: not for application use- Specified by:
ignorableWhitespacein interfaceContentHandler
-
processingInstruction
public void processingInstruction(String name, String remainder) throws SAXException
Callback interface for SAX: not for application use- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
comment
public void comment(char[] ch, int start, int length) throws SAXExceptionCallback interface for SAX (part of LexicalHandler interface): not for application use- Specified by:
commentin interfaceLexicalHandler- Throws:
SAXException
-
skippedEntity
public void skippedEntity(String name)
- Specified by:
skippedEntityin interfaceContentHandler
-
startDTD
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- Specified by:
startDTDin interfaceLexicalHandler
-
endDTD
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- Specified by:
endDTDin interfaceLexicalHandler
-
startEntity
public void startEntity(String name)
- Specified by:
startEntityin interfaceLexicalHandler
-
endEntity
public void endEntity(String name)
- Specified by:
endEntityin interfaceLexicalHandler
-
startCDATA
public void startCDATA()
- Specified by:
startCDATAin interfaceLexicalHandler
-
endCDATA
public void endCDATA()
- Specified by:
endCDATAin interfaceLexicalHandler
-
notationDecl
public void notationDecl(String name, String publicId, String systemId)
- Specified by:
notationDeclin interfaceDTDHandler
-
unparsedEntityDecl
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
- Specified by:
unparsedEntityDeclin interfaceDTDHandler- Throws:
SAXException
-
-