XmlAttlist constructor

const XmlAttlist(
  1. {required String element,
  2. required String attribute,
  3. required String? type,
  4. XmlAttlistIdentifier? identifier,
  5. String? defaultValue}
)

An Attribute-list Declaration.

Attribute-list declarations are used to define the set of attributes an element should or may have, and set contstrains on the data type and content of the attribute's values.

element and attribute both must not be null or empty.

type and defaultValue both must not be empty if they are not null.

identifier and defaultValue are both optional.

Implementation

const XmlAttlist({
  required this.element,
  required this.attribute,
  required this.type,
  this.identifier,
  this.defaultValue,
})  : assert(element.length > 0),
      assert(attribute.length > 0),
      assert(type == null || type.length > 0),
      assert(defaultValue == null || defaultValue.length > 0);