Saxon.Api

 

 

Saxon.Api

Class RawDestination


public class RawDestination
implements IDestination

A RawDestination is an Destination that accepts a sequence output by a stylesheet or query and returns it directly as an XdmValue, without constructing an XML tree, and without serialization. It corresponds to the serialization option build-tree="no".

Constructor Summary

RawDestination ()

Construct a RawDestination

 

Property Summary

 Uri BaseUri

This property determines the base URI of the constructed XdmNode. If the BaseUri property of the XdmDestination is set before the destination is written to, then the constructed XdmNode will have this base URI. Setting this property after constructing the node has no effect.

 net.sf.saxon.s9api.Destination UnderlyingDestination

The underlying Destination object in the Saxon implementation

 XdmValue XdmValue

After construction, retrieve the constructed document node.

 

Method Summary

 void Close ()

Close any resources associated with this destination. Note that this does not close any user-supplied OutputStream or Writer; those must be closed explicitly by the calling application.

 void CloseAndNotify ()

Close the destination and notify all registered listeners that it has been closed. This method is intended for internal use by Saxon. The method first calls RawDestination.Close to close the destination, then it calls Saxon.Ejava.util.function.Consumer.accept() on each of the listeners in turn to notify the fact that it has been closed.

 void OnClose (Action action)

Define an action to be performed when writing to the Destination is complete.

 

Constructor Detail

RawDestination

public RawDestination()

Construct a RawDestination

Property Detail

BaseUri

public Uri BaseUri {get; set; }

This property determines the base URI of the constructed XdmNode. If the BaseUri property of the XdmDestination is set before the destination is written to, then the constructed XdmNode will have this base URI. Setting this property after constructing the node has no effect.

UnderlyingDestination

public net.sf.saxon.s9api.Destination UnderlyingDestination {get; }

The underlying Destination object in the Saxon implementation

This property provides access to internal methods in the Saxon engine that are not specifically exposed in the .NET API. In general these methods should be considered to be less stable than the classes in the Saxon.Api namespace.

The internal methods follow Java naming conventions rather than .NET conventions.

Information about the returned net.sf.saxon.s9api.Destination object (and the objects it provides access to) is included in the Saxon JavaDoc documentation.

Value:

The underlying Destination object

XdmValue

public XdmValue XdmValue {get; }

After construction, retrieve the constructed document node.

The value of the property will be null if no data has been written to the RawDestination, either because the process that writes to the destination has not yet been run, or because the process produced no output.

Method Detail

Close

public void Close()

Close any resources associated with this destination. Note that this does not close any user-supplied OutputStream or Writer; those must be closed explicitly by the calling application.

CloseAndNotify

public void CloseAndNotify()

Close the destination and notify all registered listeners that it has been closed. This method is intended for internal use by Saxon. The method first calls RawDestination.Close to close the destination, then it calls Saxon.Ejava.util.function.Consumer.accept() on each of the listeners in turn to notify the fact that it has been closed.

OnClose

public void OnClose(Action action)

Define an action to be performed when writing to the Destination is complete.

Parameters:

action - The action to be performed.