Saxon.Api

 

 

Saxon.Api

Class XdmDestination


public class XdmDestination
implements XmlDestination

An XdmDestination is an XmlDestination in which an XdmNode is constructed to hold the output of a query or transformation: that is, a tree using Saxon's implementation of the XDM data model.

No data needs to be supplied to the XdmDestination object. The query or transformation populates an XmlNode, which may then be retrieved as the value of the XmlNode property.

An XdmDestination can be reused to hold the results of a second transformation only if the Reset method is first called to reset its state.

Nested Classes

class XdmDestination.TreeProtector

TreeProtector is a filter that ensures that the events reaching the Builder constitute a single tree rooted at an element or document node (because anything else will crash the builder)

 

Constructor Summary

XdmDestination ()

Construct an XdmDestination

 

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.

 TreeModel TreeModel

The Tree Model implementation to be used for the constructed document. By default the TinyTree is used. The main reason for using the LinkedTree alternative is if updating is required (the TinyTree is not updateable).

 XdmNode XdmNode

After construction, retrieve the constructed document node.

 

Method Summary

 void close()

Close the destination, allowing resources to be released. Saxon calls this method when it has finished writing to the destination.

 void closeAndNotify()
 java.net.URI getDestinationBaseURI()

Get the base URI of the resource being written to this destination

 net.sf.saxon.s9api.Destination GetUnderlyingDestination()

Get the underlying Saxon Destination object from the XdmDestination. This method is for internal use but is provided for the benefit of applications that need to mix use of the Saxon .NET API with direct use of the underlying objects and methods offered by the Java implementation.

 void onClose(net.sf.saxon.s9api.Action a)
 void Reset()

Reset the state of the XdmDestination so that it can be used to hold the result of another query or transformation.

 void setDestinationBaseURI(java.net.URI uri)

Set the base URI of the resource being written to this destination

 

Constructor Detail

XdmDestination

public XdmDestination()

Construct an XdmDestination

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.

TreeModel

public TreeModel TreeModel {get; set; }

The Tree Model implementation to be used for the constructed document. By default the TinyTree is used. The main reason for using the LinkedTree alternative is if updating is required (the TinyTree is not updateable).

XdmNode

public XdmNode XdmNode {get; }

After construction, retrieve the constructed document node.

The value of the property will be null if no data has been written to the XdmDestination, 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 the destination, allowing resources to be released. Saxon calls this method when it has finished writing to the destination.

closeAndNotify

public void closeAndNotify()

getDestinationBaseURI

public java.net.URI getDestinationBaseURI()

Get the base URI of the resource being written to this destination

Returns:

the base URI, or null if none is known

GetUnderlyingDestination

public net.sf.saxon.s9api.Destination GetUnderlyingDestination()

Get the underlying Saxon Destination object from the XdmDestination. This method is for internal use but is provided for the benefit of applications that need to mix use of the Saxon .NET API with direct use of the underlying objects and methods offered by the Java implementation.

onClose

public void onClose(net.sf.saxon.s9api.Action a)

Reset

public void Reset()

Reset the state of the XdmDestination so that it can be used to hold the result of another query or transformation.

setDestinationBaseURI

public void setDestinationBaseURI(java.net.URI uri)

Set the base URI of the resource being written to this destination

Parameters:

uri - the base URI to be used