Class NamespaceDef

Namespace definition.

Namespaces are identified by their URLs.

Hierarchy

  • NamespaceDef

Constructors

Properties

Accessors

Methods

Constructors

  • Constructs new namespace definition.

    Parameters

    • url: string

      Unique namespace URL.

    • Rest ...aliases: string[]

      Preferred namespace aliases. It is expected that each alias is an ASCII letter followed by any number of ASCII letters, digits, -, or _ signs. Aliases starting with xml are reserved. Empty alias is reserved for default namespace.

    Returns NamespaceDef

Properties

aliases: readonly string[]

Preferred namespace aliases.

url: string

Unique namespace URL.

Accessors

  • get alias(): string
  • The most preferred namespace alias.

    By default this is the first preferred alias, or ns if there is no preferred aliases.

    Returns string

Methods

  • Converts a local name belonging to this namespace to simple one according to the given naming schema.

    Calls applyAlias by default.

    Parameters

    • alias: string

      Namespace alias to apply to the name.

    • name: string

      A name to convert.

    • naming: Naming = default__naming

      Naming schema to use. default naming schema is used when omitted.

    Returns string

    A simple name with this namespace alias applied.

Generated using TypeDoc