Interface AttributeRuleOptions<T>

interface AttributeRuleOptions<T> {
    default?: T;
    localPart?: string;
    namespaceUri?: null | string;
    required?: boolean;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

default?: T

If the current element has no matching attribute, default will be used.

localPart?: string

Matches the QName.localPart of the element. If undefined, this will match against the property name from XmlRules.

namespaceUri?: null | string

Matches the namespaceUri of the attribute.

If null, this will only match against a null namespace.

Note that attributes do not inherit default namespaces as elements do.

required?: boolean

If true, a parsing error will be thrown if the value is undefined.