Native XFA Bind SOM

The interactive runtime resolves bind dataRef paths against actual native dataset nodes; direct editing, script rawValue assignments and materialised concealed form values consume the same selected data value

Selectors

ExpressionSelection
$recordThe actual current record containing the supplied data context
$dataThe data root itself
!dataThe legacy data root itself
$data..Detail.Price[1]The second Price under a matching descendant Detail
$data.main.*.Detail[1].Price[1]Refines wildcard branches through the requested suffix
$data.main.*[1].Detail.Price[1]Restricts the wildcard to its explicit second sibling match
$data.main.#dataGroup[1].Detail.Price[1]Uses native Data DOM group classification before sibling indexing
$data..Detail[*].Price[1]Allows every matching Detail occurrence to participate in suffix lookup
$data.main.Detail.(Price.rawValue > 100).PriceFilters each Detail with JavaScript before selecting its Price child
$data.main.Detail.[Price > 100].PriceUses FormCalc for the corresponding filter
$data.main.Price\.TaxSelects an XML element whose literal name is Price.Tax

The current record follows verified parent and child membership from the supplied occurrence; nil or data-root context selects the first data element record, while foreign or detached contexts, misleading root prefixes and incomplete trailing-dot references stay unresolved

Namespace-qualified xfa:dataNode directives and mapped character/element content determine the semantic Data class, subject to the DataValue ancestor constraint

Comments, processing instructions and ordinary text nodes do not participate as data elements

Implicit field-name binding treats dots as part of the XML name; explicit selector paths use backslash escaping for literal selector characters

Semantic owner classes

Native #dataGroup and #dataValue selectors follow the same Data classification as semantic value reads and the script model; the existing #subform and #field aliases follow those classes too

A mixed value such as <mixed>left<b>inner</b>right</mixed> remains a DataValue even though it contains an element, as does opaque rich content; elements excluded from the Data DOM do not turn their owner into a group

A descendant of a DataValue remains a value, so a conflicting namespace-qualified dataNode="dataGroup" does not override the ancestor constraint; valid group directives outside a value ancestor still select groups

Each native classification observes the current tree and charges the caller's existing operation and time budget; it is not cached across predicate mutations or node creation

Logical character values

Native Data resolver queries and script SOM paths include unnamed character values in mixed content, in the same order as named child values

For <mixed>left<b>inner</b>right</mixed>, $data.Record.mixed.#dataValue[0], [1] and [2] select the leading character value, the named b value and the trailing character value; #dataValue[*] and * include all three

Queries materialise script character values on first access, with stable identities on repeated reads and XML serialisation; calling nodes first is unnecessary

Ordinary scalar text remains its owner's value, without an additional unnamed child; a character value forced to a DataGroup retains its logical character children

Comments, processing instructions, nil-excluded character data, stale overridden text and opaque rich XML remain raw content and do not become queryable character values; the physical #text marker is not a logical SOM class

Editing character values

Version 2.1160.0 adds native field bindings and value writes for these live unnamed character values; an explicit bind.dataRef such as $data.Record.mixed.#dataValue[0] selects the actual character record

Interactive field edits, a bound field's rawValue and a selected character node's rawValue or value update that record and its bound aliases; fields bound to the enclosing mixed value receive the resulting aggregate

Changing one character value preserves named siblings, comments, processing instructions and existing CDATA; clearing a character value retains an empty CDATA record so save and reload preserve its position and the owner's DataValue class

Character writes use the normal shared value, graph-capacity, operation and deadline limits; failed native transactions restore the original XML and field values, while a caught oversized script value leaves the previous character and aggregate cells intact

Data XML append and overwrite can supply new character targets for immediate value writes and subsequent events; adjacent ordinary text at the append boundary coalesces while retaining the existing trailing character identity, and CDATA, comments and processing instructions keep their boundaries

This value path does not turn raw excluded content into a writable node or add character-node structural, MIME or annotation setters

Computed binding predicates

The delimiters select the language: .(...) is JavaScript and .[...] is FormCalc, independently of any hosting event language. The Runtime installs a bounded evaluator when the document has no application-supplied BindingPredicate callback

Each filter evaluates candidates in data order with the candidate as its context. Multiple filters run in stages: the first filter completes before the next filter processes its surviving candidates, and suffix lookup follows filtering. An evaluation error stops the lookup rather than treating that candidate as false

JavaScript requires ScriptOptions.EnableJavaScript; FormCalc follows its existing native and configured script-provider paths. Source size, shared operation allowance, elapsed time, native traversal and script stack limits remain active across candidates and internal merge retries

Scalar fields accept the first matching data identity, while repeated groups consume the complete ordered filtered selection. Ordinary reads, writes and reconciliation reuse accepted per-instance targets without running the predicate again. Removing an accepted target does not promote another match; explicit remerge starts a new binding selection

Supported native Data DOM and XML edits during filtering invalidate the current merge plan. The runtime preserves completed query decisions, migrates accepted replacement identities and rebuilds pending plans without repeating completed user filters or resetting budgets. Published Form fields retain their accepted scalar data links in the predicate snapshot; this does not expose every unpublished Form instance

Standalone native callers configure the callback and own any surrounding compound transaction. The plural resolver returns the complete ordered selection; a direct query alone does not establish persistent Form binding metadata

Transactions and native persistence

A successful edit updates the selected dataset leaf and existing aliases, including hidden fields whose value properties have materialised; unselected siblings and repeated occurrences preserve their original values

Validation failure, operation exhaustion or deadline expiry restores the native dataset and form packets byte exactly; the runtime's configured monotonic clock also governs binding traversal

SaveToBytes persists actual native XML rather than an event-only view; reopening the saved XDP consumes the selected data value again

Creation and remaining coverage

Collection parent value constraints

Version 2.1160.1 validates the resolved native collection parent as well as each parent used to create a missing path; a node constrained by a DataValue ancestor cannot become a collection parent merely because its own stored text is empty

The rule applies to inherited values with named descendants, empty inherited values and conflicting group directives below a value ancestor; rejected resolution preserves the original native XML

An ordinary unforced empty leaf below a valid group can still gain child groups, and valid existing groups retain their creation behaviour; explicit DataValue directives and nonempty scalar parents keep their existing restrictions

Deterministic named paths can create missing index-zero elements; failed suffix resolution or interrupted traversal removes allocations made by that lookup

Wildcard, descendant, class, [*] and computed predicate paths select existing nodes without allocating ambiguous missing branches

Template bind.dataRef paths can use the supplied occurrence context as well as explicit Data DOM roots; the separate SourceSet binding qualification rule does not restrict Template binding

A relative path that misses in a supplied occurrence does not search other records; an unresolved indirect binding can use that occurrence's separate native form value without allocating an ambiguous dataset path

The current native binding profile does not accept explicit relative [+n] and [-n] indices; script SOM references retain their separate index rules

Data DOM structural operations and supported global-binding rules have separate runtime APIs. Attribute selectors in native bind.dataRef paths, complete XFA node-class schema behaviour, broader unpublished Form contexts and picture-based canonical value validation remain separate coverage targets

Related APIs