Google

: Class CopyEmitter

com.nwalsh.saxon6
Class CopyEmitter

java.lang.Object
  |
  +--com.nwalsh.saxon6.CopyEmitter
Direct Known Subclasses:
CalloutEmitter, NumberLinesEmitter

public class CopyEmitter
extends java.lang.Object
implements com.icl.saxon.output.Emitter

A Saxon 6.0 Emitter that clones its input.

$Id: CopyEmitter.java,v 1.1 2000/11/28 23:05:55 ndw Exp $

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:
CalloutEmitter, NumberLinesEmitter

Constructor Summary
CopyEmitter(com.icl.saxon.om.NamePool namePool)
          Constructor for the CopyEmitter.
 
          Copy set document locator events. int[] namespaces, int nscount)
          Copy start element events.
Method Summary
 void characters(char[] chars, int start, int len)
          Copy characters.
 void comment(char[] chars, int start, int length)
          Copy comments.
 void endDocument()
          Copy end document events.
 void endElement(int nameCode)
          Copy end element events.
 com.icl.saxon.expr.FragmentValue getResultTreeFragment()
          Return the result tree fragment constructed by replaying events through this emitter.
 void processingInstruction(java.lang.String name, java.lang.String data)
          Copy processing instructions.
 void setCharacterSet(com.icl.saxon.output.CharacterSet charset)
          Copy set character set events.
 void
 void setEscaping(boolean escaping)
          Copy set escaping events.
 void setNamePool(com.icl.saxon.om.NamePool namePool)
          Copy set name pool events.
 void setOutputDetails(com.icl.saxon.output.OutputDetails details)
          Copy set output details events.
 void setUnparsedEntity(java.lang.String name, java.lang.String uri)
          Copy set unparsed entity events.
 void setWriter(java.io.Writer writer)
          Copy set writer events.
 void startDocument()
          Copy start document events.
 void
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyEmitter

public CopyEmitter(com.icl.saxon.om.NamePool namePool)

Constructor for the CopyEmitter.

Parameters:
namePool - The name pool to use for constructing elements and attributes.
Method Detail

getResultTreeFragment

public com.icl.saxon.expr.FragmentValue getResultTreeFragment()

Return the result tree fragment constructed by replaying events through this emitter.


characters

public void characters(char[] chars,
                       int start,
                       int len)
Copy characters.
Specified by:
characters in interface com.icl.saxon.output.Emitter

comment

public void comment(char[] chars,
                    int start,
                    int length)
Copy comments.
Specified by:
comment in interface com.icl.saxon.output.Emitter

endDocument

public void endDocument()
Copy end document events.
Specified by:
endDocument in interface com.icl.saxon.output.Emitter

endElement

public void endElement(int nameCode)
Copy end element events.
Specified by:
endElement in interface com.icl.saxon.output.Emitter

processingInstruction

public void processingInstruction(java.lang.String name,
                                  java.lang.String data)
Copy processing instructions.
Specified by:
processingInstruction in interface com.icl.saxon.output.Emitter

setCharacterSet

public void setCharacterSet(com.icl.saxon.output.CharacterSet charset)
Copy set character set events.
Specified by:
setCharacterSet in interface com.icl.saxon.output.Emitter

setDocumentLocator
Copy set document locator events.
Specified by:
setDocumentLocator in interface com.icl.saxon.output.Emitter

setEscaping

public void setEscaping(boolean escaping)
Copy set escaping events.
Specified by:
setEscaping in interface com.icl.saxon.output.Emitter

setNamePool

public void setNamePool(com.icl.saxon.om.NamePool namePool)
Copy set name pool events.
Specified by:
setNamePool in interface com.icl.saxon.output.Emitter

setOutputDetails

public void setOutputDetails(com.icl.saxon.output.OutputDetails details)
Copy set output details events.
Specified by:
setOutputDetails in interface com.icl.saxon.output.Emitter

setUnparsedEntity

public void setUnparsedEntity(java.lang.String name,
                              java.lang.String uri)
Copy set unparsed entity events.
Specified by:
setUnparsedEntity in interface com.icl.saxon.output.Emitter

setWriter

public void setWriter(java.io.Writer writer)
Copy set writer events.
Specified by:
setWriter in interface com.icl.saxon.output.Emitter

startDocument

public void startDocument()
Copy start document events.
Specified by:
startDocument in interface com.icl.saxon.output.Emitter

startElement
public void startElement(int nameCode,
                         int[] namespaces,
                         int nscount)
Copy start element events.
Specified by:
startElement in interface com.icl.saxon.output.Emitter