Options
All
  • Public
  • Public/Protected
  • All
Menu

Class XmlDtd<Parent>

Represents an XML document type definition (DTD).

A document type definition is structured as follows, where {name} is the name of the DTD, {sysId} is the system identifier of the DTD, {pubId} is the public identifier of the DTD, and {intSubset} is the internal subset of the DTD:

<!DOCTYPE {name} SYSTEM "{sysId}" PUBLIC "{pubId}" [
    {intSubset}
]>

DTDs can have an unlimited number of comments, attribute-list declarations, element declarations, entity declarations, notation declarations, parameter entity references, and processing instructions.

Type parameters

  • Parent

Hierarchy

  • XmlDtd

Index

Constructors

constructor

  • Parameters

    Returns XmlDtd

Properties

Private _children

_children: Array<Child<Parent>>

Private _name

_name: string

Private _parent

_parent: Parent

Private _pubId

_pubId: string | undefined = undefined

Private _sysId

_sysId: string | undefined = undefined

Private _validation

_validation: boolean

Accessors

name

  • get name(): string
  • set name(name: string): void
  • Gets the name of the DTD.

    Returns string

  • Sets the name of the DTD.

    Parameters

    • name: string

    Returns void

pubId

  • get pubId(): undefined | string
  • set pubId(pubId: string | undefined): void
  • Gets the public identifier of the DTD.

    Returns undefined | string

  • Sets the public identifier of the DTD.

    Parameters

    • pubId: string | undefined

    Returns void

sysId

  • get sysId(): undefined | string
  • set sysId(sysId: string | undefined): void
  • Gets the system identifier of the DTD.

    Returns undefined | string

  • Sets the system identifier of the DTD.

    Parameters

    • sysId: string | undefined

    Returns void

Methods

Private appendId

  • appendId(type: string, value: string, str: string, options: StringOptions): string
  • Appends the XML string representation of a public or system identifier to an existing string.

    Parameters

    Returns string

attlist

  • Adds an attribute-list declaration to this document type declaration and returns the new attribute-list declaration.

    Parameters

    Returns XmlDtdAttlist<this>

comment

  • Adds a comment to this document type declaration and returns the new comment.

    Parameters

    Returns XmlComment<this>

element

  • Adds an element declaration to this document type declaration and returns the new element declaration.

    Parameters

    Returns XmlDtdElement<this>

entity

  • Adds an entity declaration to this document type declaration and returns the new entity declaration.

    Parameters

    Returns XmlDtdEntity<this>

notation

  • Adds a notation declaration to this document type declaration and returns the new notation declaration.

    Parameters

    Returns XmlDtdNotation<this>

paramEntityRef

procInst

  • Adds a processing instruction to this document type declaration and returns the new processing instruction.

    Parameters

    Returns XmlProcInst<this>

toString

  • Returns an XML string representation of this document type declaration.

    Parameters

    Returns string

up

  • up(): Parent
  • Returns the parent of this attribute.

    Returns Parent

Generated using TypeDoc