com.icl.saxon.output
Class CDATAFilter

java.lang.Object
  |
  +--com.icl.saxon.output.ProxyEmitter
        |
        +--com.icl.saxon.output.CDATAFilter
All Implemented Interfaces:
Emitter

public class CDATAFilter
extends ProxyEmitter

CDATAFilter: This ProxyEmitter converts character data to CDATA sections, if the character data belongs to one of a set of element types to be handled this way.


Fields inherited from class com.icl.saxon.output.ProxyEmitter
baseEmitter, characterSet, outputDetails, writer
 
Constructor Summary
CDATAFilter()
           
 
Method Summary
 void characters(char[] chars, int start, int len)
          Output character data
 void comment(char[] chars, int start, int len)
          Output a comment
 void endElement(Name tag)
          Output element end tag
 void flush(java.lang.StringBuffer buffer)
          Flush the buffer containing accumulated character data, generating it as CDATA where appropriate
 void ignorableWhitespace(char[] chars, int start, int len)
          Output ignorable white space
 void processingInstruction(java.lang.String target, java.lang.String data)
          Output a processing instruction
 void setEscaping(boolean escaping)
          Set escaping on or off
 void setOutputDetails(OutputDetails details)
          Set output details
 void startElement(Name name, AttributeCollection atts)
          Output element start tag
 
Methods inherited from class com.icl.saxon.output.ProxyEmitter
endDocument, setCharacterSet, setUnderlyingEmitter, setWriter, startDocument, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDATAFilter

public CDATAFilter()
Method Detail

startElement

public void startElement(Name name,
                         AttributeCollection atts)
                  throws org.xml.sax.SAXException
Output element start tag
Overrides:
startElement in class ProxyEmitter

endElement

public void endElement(Name tag)
                throws org.xml.sax.SAXException
Output element end tag
Overrides:
endElement in class ProxyEmitter

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Output a processing instruction
Overrides:
processingInstruction in class ProxyEmitter

characters

public void characters(char[] chars,
                       int start,
                       int len)
                throws org.xml.sax.SAXException
Output character data
Overrides:
characters in class ProxyEmitter

ignorableWhitespace

public void ignorableWhitespace(char[] chars,
                                int start,
                                int len)
                         throws org.xml.sax.SAXException
Output ignorable white space

comment

public void comment(char[] chars,
                    int start,
                    int len)
             throws org.xml.sax.SAXException
Output a comment
Overrides:
comment in class ProxyEmitter

setEscaping

public void setEscaping(boolean escaping)
                 throws org.xml.sax.SAXException
Set escaping on or off
Overrides:
setEscaping in class ProxyEmitter

flush

public void flush(java.lang.StringBuffer buffer)
           throws org.xml.sax.SAXException
Flush the buffer containing accumulated character data, generating it as CDATA where appropriate

setOutputDetails

public void setOutputDetails(OutputDetails details)
                      throws org.xml.sax.SAXException
Set output details
Overrides:
setOutputDetails in class ProxyEmitter
Following copied from interface: com.icl.saxon.output.Emitter
Parameters:
details - The details of the required output