Package com.nwalsh.saxon
Class CopyEmitter
java.lang.Object
com.icl.saxon.output.Emitter
com.nwalsh.saxon.CopyEmitter
- All Implemented Interfaces:
Result
- Direct Known Subclasses:
CalloutEmitter
,ColumnUpdateEmitter
,NumberLinesEmitter
,UnwrapLinksEmitter
public class CopyEmitter
extends com.icl.saxon.output.Emitter
A Saxon 6.0 Emitter that clones its input.
$Id: CopyEmitter.java 5907 2006-04-27 08:26:47Z xmldoc $
Copyright (C) 2000 Norman Walsh.
This class provides a Saxon 6.* implementation of an emitter that manufactures a cloned result tree fragment.
The purpose of this emitter is to provide something for CalloutEmitter and NumberLinesEmitter to extend. This emitter simply copies all input to a new result tree fragment.
Change Log:
- 1.0
Initial release.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.icl.saxon.om.NamePool
The namePool.protected com.icl.saxon.expr.FragmentValue
The result tree fragment containing the copied fragment.protected com.icl.saxon.output.Emitter
Fields inherited from class com.icl.saxon.output.Emitter
locator, outputProperties, outputStream, systemId, writer
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
-
Constructor Summary
ConstructorsConstructorDescriptionCopyEmitter
(com.icl.saxon.Controller controller, com.icl.saxon.om.NamePool namePool) Constructor for the CopyEmitter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] chars, int start, int len) Copy characters.void
comment
(char[] chars, int start, int length) Copy comments.void
Copy end document events.void
endElement
(int nameCode) Copy end element events.com.icl.saxon.expr.FragmentValue
Return the result tree fragment constructed by replaying events through this emitter.void
processingInstruction
(String name, String data) Copy processing instructions.void
setDocumentLocator
(Locator locator) Copy set document locator events.void
setEscaping
(boolean escaping) Copy set escaping events.void
setNamePool
(com.icl.saxon.om.NamePool namePool) Copy set name pool events.void
setUnparsedEntity
(String name, String uri) Copy set unparsed entity events.void
Copy set writer events.void
Copy start document events.void
startElement
(int nameCode, Attributes attributes, int[] namespaces, int nscount) Copy start element events.Methods inherited from class com.icl.saxon.output.Emitter
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setOutputProperties, setOutputStream, setSystemId, usesWriter
-
Field Details
-
rtf
protected com.icl.saxon.expr.FragmentValue rtfThe result tree fragment containing the copied fragment. -
rtfEmitter
protected com.icl.saxon.output.Emitter rtfEmitter -
namePool
protected com.icl.saxon.om.NamePool namePoolThe namePool.
Copied from the caller, it should be the runtime name pool.
-
-
Constructor Details
-
CopyEmitter
public CopyEmitter(com.icl.saxon.Controller controller, com.icl.saxon.om.NamePool namePool) Constructor for the CopyEmitter.
- Parameters:
namePool
- The name pool to use for constructing elements and attributes.
-
-
Method Details
-
getResultTreeFragment
public com.icl.saxon.expr.FragmentValue getResultTreeFragment()Return the result tree fragment constructed by replaying events through this emitter.
-
characters
Copy characters.- Specified by:
characters
in classcom.icl.saxon.output.Emitter
- Throws:
TransformerException
-
comment
Copy comments.- Specified by:
comment
in classcom.icl.saxon.output.Emitter
- Throws:
TransformerException
-
endDocument
Copy end document events.- Specified by:
endDocument
in classcom.icl.saxon.output.Emitter
- Throws:
TransformerException
-
endElement
Copy end element events.- Specified by:
endElement
in classcom.icl.saxon.output.Emitter
- Throws:
TransformerException
-
processingInstruction
Copy processing instructions.- Specified by:
processingInstruction
in classcom.icl.saxon.output.Emitter
- Throws:
TransformerException
-
setDocumentLocator
Copy set document locator events.- Overrides:
setDocumentLocator
in classcom.icl.saxon.output.Emitter
-
setEscaping
Copy set escaping events.- Overrides:
setEscaping
in classcom.icl.saxon.output.Emitter
- Throws:
TransformerException
-
setNamePool
public void setNamePool(com.icl.saxon.om.NamePool namePool) Copy set name pool events.- Overrides:
setNamePool
in classcom.icl.saxon.output.Emitter
-
setUnparsedEntity
Copy set unparsed entity events.- Overrides:
setUnparsedEntity
in classcom.icl.saxon.output.Emitter
- Throws:
TransformerException
-
setWriter
Copy set writer events.- Overrides:
setWriter
in classcom.icl.saxon.output.Emitter
-
startDocument
Copy start document events.- Specified by:
startDocument
in classcom.icl.saxon.output.Emitter
- Throws:
TransformerException
-
startElement
public void startElement(int nameCode, Attributes attributes, int[] namespaces, int nscount) throws TransformerException Copy start element events.- Specified by:
startElement
in classcom.icl.saxon.output.Emitter
- Throws:
TransformerException
-