How many type of Tag Prefixes in YAML?

Category: YAMLHow many type of Tag Prefixes in YAML?
Editor">Editor Staff asked 2 years ago

How many type of Tag Prefixes in YAML?

1 Answers
Editor">Editor Staff answered 2 years ago

There are two types of tag prefixes such as

  • Local Tag Prefix and
  • Global Tag Prefix Local Tag Prefix – If the prefix consists of ! indentifier, then the shorthands using handle are expanded to a local tag.

Syntax
c-ns-local-tag-prefix     ::=      “!” ns-uri-char*
Global Tag Prefix – If the prefix begin with an identifier other than !, it must be a valid URI prefix. Shorthands using handle are expanded to a global URI tag.
Syntax
 ns-global-tag-prefix      ::=      ns-tag-char ns-uri-char*