Package com.icl.saxon.output
Class CDATAFilter
java.lang.Object
com.icl.saxon.output.Emitter
com.icl.saxon.output.ProxyEmitter
com.icl.saxon.output.CDATAFilter
- All Implemented Interfaces:
Result
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.
- Author:
- Michael H. Kay
-
Field Summary
Fields inherited from class com.icl.saxon.output.ProxyEmitter
baseEmitter, outputProperties
Fields inherited from class com.icl.saxon.output.Emitter
locator, namePool, outputStream, systemId, writer
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] chars, int start, int len) Output character datavoid
comment
(char[] chars, int start, int len) Output a commentvoid
endElement
(int nameCode) Output element end tagvoid
flush
(StringBuffer buffer) Flush the buffer containing accumulated character data, generating it as CDATA where appropriatevoid
ignorableWhitespace
(char[] chars, int start, int len) Output ignorable white spaceboolean
isCDATA
(int fingerprint) See if a particular element is a CDATA elementvoid
processingInstruction
(String target, String data) Output a processing instructionvoid
setEscaping
(boolean escaping) Set escaping on or offvoid
setOutputProperties
(Properties details) Set output propertiesvoid
startElement
(int nameCode, Attributes atts, int[] namespaces, int nscount) Output element start tagMethods inherited from class com.icl.saxon.output.ProxyEmitter
endDocument, setDocumentLocator, setNamePool, setUnderlyingEmitter, setUnparsedEntity, setWriter, startDocument
Methods inherited from class com.icl.saxon.output.Emitter
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setOutputStream, setSystemId, usesWriter
-
Constructor Details
-
CDATAFilter
public CDATAFilter()
-
-
Method Details
-
startElement
public void startElement(int nameCode, Attributes atts, int[] namespaces, int nscount) throws TransformerException Output element start tag- Overrides:
startElement
in classProxyEmitter
- Parameters:
namespaces
- Array of namespace codes identifying the namespace prefix/uri pairs associated with this elementnscount
- Number of significant entries within namespaces array- Throws:
TransformerException
-
endElement
Output element end tag- Overrides:
endElement
in classProxyEmitter
- Throws:
TransformerException
-
processingInstruction
Output a processing instruction- Overrides:
processingInstruction
in classProxyEmitter
- Throws:
TransformerException
-
characters
Output character data- Overrides:
characters
in classProxyEmitter
- Throws:
TransformerException
-
ignorableWhitespace
Output ignorable white space- Throws:
TransformerException
-
comment
Output a comment- Overrides:
comment
in classProxyEmitter
- Throws:
TransformerException
-
setEscaping
Set escaping on or off- Overrides:
setEscaping
in classProxyEmitter
- Throws:
TransformerException
-
flush
Flush the buffer containing accumulated character data, generating it as CDATA where appropriate- Throws:
TransformerException
-
setOutputProperties
Set output properties- Overrides:
setOutputProperties
in classProxyEmitter
-
isCDATA
public boolean isCDATA(int fingerprint) See if a particular element is a CDATA element
-