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 ProxyEmitter
baseEmitter, outputPropertiesFields inherited from interface Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] chars, int start, int len) Output character datavoidcomment(char[] chars, int start, int len) Output a commentvoidendElement(int nameCode) Output element end tagvoidflush(StringBuffer buffer) Flush the buffer containing accumulated character data, generating it as CDATA where appropriatevoidignorableWhitespace(char[] chars, int start, int len) Output ignorable white spacebooleanisCDATA(int fingerprint) See if a particular element is a CDATA elementvoidprocessingInstruction(String target, String data) Output a processing instructionvoidsetEscaping(boolean escaping) Set escaping on or offvoidsetOutputProperties(Properties details) Set output propertiesvoidstartElement(int nameCode, Attributes atts, int[] namespaces, int nscount) Output element start tagMethods inherited from class ProxyEmitter
endDocument, setDocumentLocator, setNamePool, setUnderlyingEmitter, setUnparsedEntity, setWriter, startDocumentMethods inherited from class 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:
startElementin 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:
endElementin classProxyEmitter- Throws:
TransformerException
-
processingInstruction
Output a processing instruction- Overrides:
processingInstructionin classProxyEmitter- Throws:
TransformerException
-
characters
Output character data- Overrides:
charactersin classProxyEmitter- Throws:
TransformerException
-
ignorableWhitespace
Output ignorable white space- Throws:
TransformerException
-
comment
Output a comment- Overrides:
commentin classProxyEmitter- Throws:
TransformerException
-
setEscaping
Set escaping on or off- Overrides:
setEscapingin classProxyEmitter- Throws:
TransformerException
-
flush
Flush the buffer containing accumulated character data, generating it as CDATA where appropriate- Throws:
TransformerException
-
setOutputProperties
Set output properties- Overrides:
setOutputPropertiesin classProxyEmitter
-
isCDATA
public boolean isCDATA(int fingerprint) See if a particular element is a CDATA element
-