Package net.sf.saxon.serialize
Class MessageWarner
- java.lang.Object
-
- net.sf.saxon.event.SequenceReceiver
-
- net.sf.saxon.serialize.Emitter
-
- net.sf.saxon.serialize.XMLEmitter
-
- net.sf.saxon.serialize.MessageWarner
-
- All Implemented Interfaces:
javax.xml.transform.Result,Receiver,ReceiverWithOutputProperties
public class MessageWarner extends XMLEmitter
MessageWarner is a user-selectable receiver for XSLT xsl:message output. It causes xsl:message output to be notified to the warning() method of the JAXP ErrorListener, or to the error() method if terminate="yes" is specified. This behaviour is specified in recent versions of the JAXP interface specifications, but it is not the default behaviour, for backwards compatibility reasons.The text of the message that is sent to the ErrorListener is an XML serialization of the actual message content.
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.serialize.XMLEmitter
attSpecials, canonical, characterReferenceGenerator, declarationIsWritten, delimiter, elementCode, elementStack, indentForNextAttribute, openStartTag, started, startedElement, undeclareNamespaces, unfailing
-
Fields inherited from class net.sf.saxon.serialize.Emitter
allCharactersEncodable, characterSet, outputProperties, outputStream, streamResult, writer
-
Fields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemId
-
-
Constructor Summary
Constructors Constructor Description MessageWarner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()End of the document.voidendDocument()Notify the end of a document nodevoidprocessingInstruction(java.lang.String target, java.lang.CharSequence data, Location locationId, int properties)Handle a processing instruction.voidstartDocument(int properties)Start of a document node.-
Methods inherited from class net.sf.saxon.serialize.XMLEmitter
characters, closeStartTag, comment, convertToAscii, emptyElementTagCloser, endElement, getAttributeIndentString, isStarted, namespace, open, openDocument, setCharacterReferenceGenerator, setEscapeNonAscii, setIndentForNextAttribute, startElement, testCharacters, usesTypeAnnotations, writeAttribute, writeCharSequence, writeDeclaration, writeDocType, writeDocTypeWithNullSystemId, writeEscape
-
Methods inherited from class net.sf.saxon.serialize.Emitter
append, getOutputProperties, getOutputStream, getWriter, makeOutputStream, makeWriter, setOutputProperties, setOutputStream, setStreamResult, setUnparsedEntity, setWriter, usesWriter
-
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, setSystemId
-
-
-
-
Method Detail
-
startDocument
public void startDocument(int properties) throws XPathExceptionDescription copied from class:XMLEmitterStart of a document node. Nothing is done at this stage: the opening of the output file is deferred until some content is written to it.- Specified by:
startDocumentin interfaceReceiver- Overrides:
startDocumentin classXMLEmitter- Parameters:
properties- bit-significant integer indicating properties of the document node. The definitions of the bits are in classReceiverOption- Throws:
XPathException- if an error occurs
-
processingInstruction
public void processingInstruction(java.lang.String target, java.lang.CharSequence data, Location locationId, int properties) throws XPathExceptionDescription copied from class:XMLEmitterHandle a processing instruction.- Specified by:
processingInstructionin interfaceReceiver- Overrides:
processingInstructionin classXMLEmitter- Parameters:
target- The PI name. This must be a legal name (it will not be checked).data- The data portion of the processing instructionlocationId- provides information such as line number and system ID.properties- Additional information about the PI.- Throws:
XPathException- if an error occurs
-
endDocument
public void endDocument() throws XPathExceptionDescription copied from class:XMLEmitterNotify the end of a document node- Specified by:
endDocumentin interfaceReceiver- Overrides:
endDocumentin classXMLEmitter- Throws:
XPathException- if an error occurs
-
close
public void close()
Description copied from class:XMLEmitterEnd of the document.- Specified by:
closein interfaceReceiver- Overrides:
closein classXMLEmitter
-
-