Native XFA Property DOM

General execution with EnableJavaScript includes property children of form containers in the live event tree, including value, typed value, font, fill, color, ui, border and edge nodes

Named containers use their name in SOM paths; property nodes use their class name and preserve their actual name attribute, which is usually empty

Typed values and attributes

const field = xfa.resolveNode("main.row[1].cell");
field.value.text.value = "25";
field.font.size = "18pt";
field.font.fill.color.value = "0,128,255";
field.ui.textEdit.multiLine = "1";
field.resolveNode("border.edge[1]").thickness = "3pt";
field.font.setAttribute("saved", "custom");
const saved = field.font.getAttribute("custom");

row[1].cell.value.text.value = 25
row[1].cell.font.size = "18pt"

A typed child under a field's value node shares the field's live rawValue; reads and writes through value.text.value, field.rawValue and the bound dataNode observe each other immediately

For property nodes with a value attribute, such as color, the value property reads and writes that attribute; for scalar content nodes it reads and writes text content

Attributes present in the effective property binding are exposed as direct properties, except reserved node and engine members; getAttribute(name) reads an arbitrary attribute and setAttribute(value, name) writes one and exposes a safe new name immediately

FormCalc resolves property paths and assigns scalar attributes through the same event tree; property siblings support occurrence indices and class selectors

Provider-free native FormCalc values

Native Runtime FormCalc events with EnableJavaScript=False use the same attribute-backed value contract: authored attributes and supported schema defaults are read through the effective form property, and assignments update that attribute rather than writing hidden text beside it

An explicit empty assignment preserves value="" so the original attribute or schema default does not reappear; a property whose value is content retains its text representation and explicit empty text marker

rawValue remains the content accessor and is independent of an attribute-backed value; ordinary field and Data value access keeps its existing behavior

The same attribute route supports graph-owned detached property nodes that are later reattached, shares the event's original budgets and restores the document if the event fails

var color = Ref(xfa.form.main.a.getElement("font").getElement("fill").getElement("color"))
color.value = "17,34,51"
color.value = ""

Explicit native attribute methods

On a property node, provider-free native getAttribute(name) reads the effective XML attribute and setAttribute(value, name) writes that attribute through the existing transactional property action

The name is an attribute name even when it matches a node member: an attribute named className does not change the node class, an attribute named length does not change its collection length, and an attribute named rawValue does not replace its text content

A missing attribute reads as an empty string; explicitly creating or clearing a value attribute immediately updates subsequent attribute-backed value access, using current form overrides and supported schema defaults

Setter names use the existing supported unqualified XML-name rules; malformed names are rejected before action encoding and the event restores its original document bytes

var font = Ref(xfa.form.main.a.getElement("font"))
font.rawValue = "Content"
font.setAttribute("Metadata", "rawValue")
var content = font.rawValue
var metadata = font.getAttribute("rawValue")

Here content remains Content and metadata is Metadata; these explicit property methods do not alter the existing Form, Data or Template method contracts

Native persistence and rendering

Successful writes create or update property nodes beneath the matching container occurrence in the native form packet; the template and other repeated occurrences retain their defaults

Property lookup follows class and local occurrence beneath the named container rather than skipping unnamed nodes; changing a property name attribute preserves its identity, and saved XDP reloads effective overrides

Retained property handles follow their published owner identities through instance insertion and movement; writing a handle after its instance is removed aborts and restores the transaction

Font typeface and size participate in per-instance growable text measurement and reflow; flatten reads effective font, color, border, paragraph and supported UI attributes for each field occurrence

Rich text draws consume effective font, paragraph, inline CSS and scalar content overrides for each occurrence, including their measurement and run placement

Instance creation retains all property sibling defaults, including multiple edge nodes, and uses template attribute values rather than another occurrence's overrides

UI overrides create supported widget choices and change the actual per-instance runtime kind and native field flags after a successful event

Budgets and lower-level bindings

Property traversal shares the event node, depth, operation and byte budgets; native text and attribute writes obey MaxValueChars, and failed writes restore native field values, property overrides, script state and instance order

Direct callers use xebdProperty and supply Attributes and DefaultAttributes; the latter initialize newly cloned nodes

A property attribute action contains the attribute name, a NUL separator and the value in TXFAEventAction.Value; TXFAWidgetRuntime validates and applies it to the native property target

Coverage

The event tree includes declared property nodes and their effective attributes, with schema defaults for supported formatting and widget classes; absent-property creation now materializes supported formatting paths in the native form packet

Event, calculate and validate declarations remain execution metadata; variables scripts remain script objects, and general property editing does not activate metadata scripts

Additional schema property classes, generic removal and reparenting, namespace-qualified attribute mutation, additional layout property consumers and further rich text or widget editing features continue as separate targets

Related APIs

Live SOM Resolution, Native Data DOM, HPDFXFAResolveFormInstanceProperty and Interactive XFA Runtime