Package com.saxonica.serialize
Class XQueryEmitter
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.serialize.Emitter
net.sf.saxon.serialize.XMLEmitter
com.saxonica.serialize.XQueryEmitter
- All Implemented Interfaces:
Result
,Receiver
,ReceiverWithOutputProperties
The XQueryEmitter is designed to serialize an XQuery that was originally embedded in an
XML document. It is a variant of the XMLEmitter, and differs in that the operators <, >, <=, >=, <<, and >>
are output without escaping. They are recognized by virtue of the fact that they appear in text or attribute
content between curly braces but not in quotes.
-
Field Summary
Fields inherited from class net.sf.saxon.serialize.XMLEmitter
attSpecials, canonical, characterReferenceGenerator, declarationIsWritten, delimiter, DOCTYPE, elementCode, elementStack, indentForNextAttribute, internalSubset, openStartTag, RIGHT_ANGLE_NEWLINE, specialInAtt, specialInAttSingle, specialInText, started, startedElement, undeclareNamespaces, unfailing
Fields inherited from class net.sf.saxon.serialize.Emitter
allCharactersEncodable, characterSet, outputProperties, writer
Fields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemId
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
writeEscape
(UnicodeString chars, boolean inAttribute) Write contents of array to current writer, after escaping special characters.Methods inherited from class net.sf.saxon.serialize.XMLEmitter
characters, close, closeStartTag, comment, convertToAscii, endDocument, endElement, isStarted, namespace, open, openDocument, processingInstruction, setCharacterReferenceGenerator, setEscapeNonAscii, setIndentForNextAttribute, startDocument, startElement, testCharacters, usesTypeAnnotations, writeAttribute, writeAttributeIndentString, writeCodePoint, writeDeclaration, writeDocType, writeDocTypeWithNullSystemId, writeEmptyElementTagCloser
Methods inherited from class net.sf.saxon.serialize.Emitter
append, getOutputProperties, setMustClose, setOutputProperties, setUnicodeWriter, setUnparsedEntity
Methods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getNamePool, getPipelineConfiguration, getSystemId, handlesAppend, setPipelineConfiguration, setSystemId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.saxon.event.Receiver
append, getPipelineConfiguration, handlesAppend, setPipelineConfiguration
Methods inherited from interface javax.xml.transform.Result
getSystemId, setSystemId
-
Constructor Details
-
XQueryEmitter
public XQueryEmitter()
-
-
Method Details
-
writeEscape
protected void writeEscape(UnicodeString chars, boolean inAttribute) throws IOException, XPathException Write contents of array to current writer, after escaping special characters. This method converts the XML special characters (such as < and &) into their predefined entities.- Overrides:
writeEscape
in classXMLEmitter
- Parameters:
chars
- The character sequence containing the stringinAttribute
- Set to true if the text is in an attribute value- Throws:
IOException
- if an IO exception occursXPathException
- if an IO exception occurs
-