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 XdmArray


public class XdmArray
extends XdmFunctionItem

The class XdmArray represents an array item in an XPath 3.1 sequence. An array in the XDM data model. An array is a list of zero or more members, each of which is an arbitrary XDM value.The array itself is an XDM item.


Constructor Summary
XdmArray()

Constructor to create an empty XdmArray

XdmArray(XdmValue value)

Create an XdmArray whose members are single items, corresponding one-to-one with the items making up a supplied sequence.

XdmArray(Saxon.Api.XdmValue[] members)

Create an XdmArray supplying the members as an array of XdmValue objects

XdmArray(System.Collections.Generic.List{Saxon.Api.XdmValue} members)

Create an XdmArray supplying the members as a collection of XdmValue objects

 
Method Summary
 int ArrayLength()

Get the number of members in the array

 XdmValue Get(int n)

Get the n'th member in the array, counting from zero.

 XdmArray Put(int n, XdmValue value)

Create a new array in which one member is replaced with a new value.

 List<XdmValue> AsList()

Get the members of the array in the form of a list.

static XdmArray MakeArray(System.Object[] o)

Make an XDM array from an object array. Each member of the supplied array is converted to a single member in the result array using the method {@link XdmValue#MakeValue(Object)}

static XdmArray MakeArray(System.Boolean[] o)

Make an XdmArray whose members are xs:boolean values

static XdmArray MakeArray(System.Int64[] o)

Make an XdmArray whose members are xs:long values

static XdmArray MakeArray(System.Int32[] o)

Make an XdmArray whose members are xs:integer values

static XdmArray MakeArray(System.Byte[] o)

Make an XdmArray whose members are xs:integer values

 
Constructor Detail

XdmArray

public XdmArray()

Constructor to create an empty XdmArray


XdmArray

public XdmArray(XdmValue value)

Create an XdmArray whose members are single items, corresponding one-to-one with the items making up a supplied sequence.

Parameters:
value -
A sequence of items; each item becomes a member of the array.

XdmArray

public XdmArray(Saxon.Api.XdmValue[] members)

Create an XdmArray supplying the members as an array of XdmValue objects

Parameters:
members -
Members an array of XdmValue objects. Note that subsequent changes to the array will have no effect on the XdmValue.

XdmArray

public XdmArray(System.Collections.Generic.List{Saxon.Api.XdmValue} members)

Create an XdmArray supplying the members as a collection of XdmValue objects

Note that the argument can be a single XdmValue representing a sequence, in which case the constructed array will have one member for each item in the supplied sequence.

Parameters:
members -
members a sequence of XdmValue objects. Note that if this is supplied as a list or similar collection, subsequent changes to the list/collection will have no effect on the XdmValue.

Method Detail

ArrayLength

public int ArrayLength()

Get the number of members in the array

(Note that the {@link #size()} method returns 1 (one), because an XDM array is an item.)

Returns:
the number of members in the array.

Get

public XdmValue Get(int n)

Get the n'th member in the array, counting from zero.

Parameters:
n -
the member that is required, counting the first member in the array as member zero
Returns:
the n'th member in the sequence making up the array, counting from zero

Put

public XdmArray Put(int n,
XdmValue value)

Create a new array in which one member is replaced with a new value.

Parameters:
n -
the position of the member that is to be replaced, counting the first member in the array as member zero
value -
Returns:

AsList

public List<XdmValue> AsList()

Get the members of the array in the form of a list.

Returns:
A list of the members of this array.

MakeArray

public static XdmArray MakeArray(System.Object[] o)

Make an XDM array from an object array. Each member of the supplied array is converted to a single member in the result array using the method {@link XdmValue#MakeValue(Object)}

Parameters:
o -
the array of objects
Returns:
the result of the conversion if successful

MakeArray

public static XdmArray MakeArray(System.Boolean[] o)

Make an XdmArray whose members are xs:boolean values

Parameters:
o -
input the input array of booleans
Returns:
an XdmArray whose members are xs:boolean values corresponding one-to-one with the input

MakeArray

public static XdmArray MakeArray(System.Int64[] o)

Make an XdmArray whose members are xs:long values

Parameters:
o -
input the input array of integers
Returns:
an XdmArray whose members are xs:integer values corresponding one-to-one with the input

MakeArray

public static XdmArray MakeArray(System.Int32[] o)

Make an XdmArray whose members are xs:integer values

Parameters:
o -
input the input array of integers
Returns:
an XdmArray whose members are xs:integer values corresponding one-to-one with the input

MakeArray

public static XdmArray MakeArray(System.Byte[] o)

Make an XdmArray whose members are xs:integer values

Parameters:
o -
input the input array of integers
Returns:
an XdmArray whose members are xs:integer values corresponding one-to-one with the input