XmlDoctype constructor

const XmlDoctype({
  1. required String element,
  2. bool isSystem = false,
  3. bool isPublic = false,
  4. String? externalDtdName,
  5. String? externalDtdUri,
  6. List<XmlNode>? externalDtd,
  7. List<XmlNode>? internalDtd,
})

A XML DocType declaration.

element is required, must not be null, and must be > 0 in length.

isSystem and isPublic must not be null; only one of them may be true.

Implementation

const XmlDoctype({
  required this.element,
  this.isSystem = false,
  this.isPublic = false,
  this.externalDtdName,
  this.externalDtdUri,
  this.externalDtd,
  this.internalDtd,
})  : assert(element.length > 0),
      assert(!(isPublic && isSystem),
          '[isPublic] and [isSystem] must not both be `true`.');