Saxon.Api

Class DocumentBuilder

Class DomDestination

Class DynamicContext

Class DynamicError

Class EmptyEnumerator

Class ExtensionFunctionCall

Class ExtensionFunctionDefinition

Class InvalidityHandlerWrapper

Class NamespaceConstant

Class NullDestination

Class Processor

Class QName

Class SchemaManager

Class SchemaValidator

Class Serializer

Class StandardLogger

Class StaticContext

Class StaticError

Class TextWriterDestination

Class WhitespacePolicy

Class XPathCompiler

Class XPathExecutable

Class XPathSelector

Class XQueryCompiler

Class XQueryEvaluator

Class XQueryExecutable

Class XdmAnyFunctionType

Class XdmAnyItemType

Class XdmAnyNodeType

Class XdmArray

Class XdmAtomicType

Class XdmAtomicValue

Class XdmDestination

  - Class TreeProtector

Class XdmEmptySequence

Class XdmExternalObjectValue

Class XdmFunctionItem

Class XdmItem

Class XdmItemType

Class XdmMap

Class XdmNode

Class XdmNodeKind

Class XdmSequenceType

Class XdmValue

Class XmlDestination

Class Xslt30Transformer

Class XsltCompiler

Class XsltExecutable

  - Class ParameterDetails

Class XsltPackage

Class XsltTransformer

Enum RecoveryPolicy

Enum SchemaValidationMode

Enum TreeModel

Enum XdmAxis

Interface IInvalidityHandler

Interface IMessageListener

Interface IQueryResolver

Interface IResultDocumentHandler

Interface IXdmEnumerator

Interface IXmlLocation

Interface SchemaResolver

 

Saxon.Api
Class TextWriterDestination


public class TextWriterDestination
extends XmlDestination

A TextWriterDestination is an implementation of XmlDestination that wraps an instance of XmlWriter.

The name TextWriterDestination is a misnomer; originally this class would only wrap an XmlTextWriter. It will now wrap any XmlWriter.

Note that when a TextWriterDestination is used to process the output of a stylesheet or query, the output format depends only on the way the underlying XmlWriter is configured; serialization parameters present in the stylesheet or query are ignored. The XSLT disable-output-escaping option is also ignored. If serialization is to be controlled from the stylesheet or query, use a Serializer as the Destination.


Constructor Summary
TextWriterDestination(System.Xml.XmlWriter writer)

Construct a TextWriterDestination

 
Property Summary
 bool CloseAfterUse

The CloseAfterUse property indicates whether the underlying XmlWriter is closed (by calling its Close() method) when Saxon has finished writing to it. The default value is true, in which case Close() is called. If the property is set to false, Saxon will refrain from calling the Close() method, and merely call Flush(), which can be useful if further output is to be written to the XmlWriter by the application.

 
Method Summary
 net.sf.saxon.event.Receiver GetReceiver(net.sf.saxon.event.PipelineConfiguration pipe)

Return a Receiver. Saxon calls this method to obtain a Java Receiver, to which it then sends a sequence of events representing the content of an XML document. The method is intended primarily for internal use, and may give poor diagnostics if used incorrectly.

 
Constructor Detail

TextWriterDestination

public TextWriterDestination(System.Xml.XmlWriter writer)

Construct a TextWriterDestination

Parameters:
writer -
The XmlWriter that is to be notified of the events representing the XML document.

Property Detail

CloseAfterUse

public bool CloseAfterUse {get; set; }

The CloseAfterUse property indicates whether the underlying XmlWriter is closed (by calling its Close() method) when Saxon has finished writing to it. The default value is true, in which case Close() is called. If the property is set to false, Saxon will refrain from calling the Close() method, and merely call Flush(), which can be useful if further output is to be written to the XmlWriter by the application.


Method Detail

GetReceiver

public override net.sf.saxon.event.Receiver GetReceiver(net.sf.saxon.event.PipelineConfiguration pipe)

Return a Receiver. Saxon calls this method to obtain a Java Receiver, to which it then sends a sequence of events representing the content of an XML document. The method is intended primarily for internal use, and may give poor diagnostics if used incorrectly.

Parameters:
pipe -
JPipelineConfiguration. The Saxon configuration. This is supplied so that the destination can use information from the configuration (for example, a reference to the name pool) to construct or configure the returned Receiver.
Returns:
The receiver.