PhoenixmlDb.Core
XdmSequence
An ordered sequence of XDM items — the public wire-format for passing values between transformations and queries without serializing through XML markup.
#XdmSequence
Namespace: PhoenixmlDb.Xdm
An ordered sequence of XDM items — the public wire-format for passing values between transformations and queries without serializing through XML markup.
An item may be: An XDM node ( and its concrete subclasses) An atomic value (, , , , , , , , , , , , , …) A map (IDictionary<object, object?>) or array (IReadOnlyList<object?>) A function item When the sequence contains items, those nodes reference their children by NodeId through the property. Producing engines (XsltTransformer, XQuery's QueryEngine) populate with the node-store backing their results so the sequence can be passed to another engine without losing tree-navigation ability. For pure-atomic sequences (no nodes), is null and the sequence is fully self-contained.
#Properties
| Name | Description |
|---|---|
Count
|
|
Empty
|
The empty sequence. |
Head
|
The first item, or null for the empty sequence (Saxon-style head accessor). |
IsEmpty
|
True for the empty sequence. |
IsSingleNode
|
True when the sequence contains exactly one node item. Useful for guarding AsSingleNode() calls. |
Item(Int32)
|
|
Store
|
The node-store backing any items in this sequence. Null for sequences containing only atomic values, or for sequences whose nodes do not require store-based child resolution. Consumed by engine overloads that accept as input. |
Tail
|
The sub-sequence containing all items except the first (Saxon-style tail accessor). Empty for a zero- or single-item sequence. |
#Methods
#AsSingleNode
Returns the single node item, or null if the sequence is not exactly one node.
#FromEngineResult(Collections.Generic.IReadOnlyList<Object>,Object)
Internal factory used by engines to wrap a freshly-produced result. Bypasses the public type-segregation guards because the engine knows what's in the items.
#GetEnumerator
#Of(Object)
A sequence containing exactly one atomic item. For node items, use so the sequence can carry the matching node-store reference.
#OfAtomics(Object[])
A sequence containing the supplied atomic items. Throws if any item is an — node items require a paired node-store; use for those.
#OfNode(PhoenixmlDb.Xdm.Nodes.XdmNode,Object)
A sequence containing a single node item, paired with the node-store backing it.
Parameters:
-
node— The node value. -
store— The node-store backing the node's child references. Typically obtained from a previous transformation result (see XsltTransformer.TransformToSequenceAsync) or constructed directly (e.g. XdmInMemoryStore).
#OfNodes(Object,PhoenixmlDb.Xdm.Nodes.XdmNode[])
A sequence of node items, all sharing the same backing node-store.