You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec says the following about global tag prefixes:
If the prefix begins with a character other than “!”, it must to be a valid URI prefix, and should contain at least the scheme and the authority. Shorthands using the associated handle are expanded to globally unique URI tags, and their semantics is consistent across applications. In particular, every documents in every stream must assign the same semantics to the same global tag.
What is a “valid URI prefix”? Is it any string that is the prefix of some valid URI? And what does it mean to “contain at least… the authority”? Typically global URI tags use the Tag URI scheme, which always has an empty authority component. (In tag:yaml.org,2002:bool, the authority is empty and the path is yaml.org,2002:bool.) Should this be interpreted to mean that the prefix should uniquely specify the authority, so that every possible URI beginning with the prefix has the same authority? If so, i think this would be equivalent to requiring that the URI contain at least one character from the path, query, or fragment components.
A few examples:
tag: includes the scheme, but no authority. It could be the prefix of a URI with an authority, which would be valid as a URI but invalid as a Tag URI.
tag:foo does not include an authority component, but one must presume it to be a valid URI prefix.
http://example.com includes an authority component, but it is a prefix of http://example.com.example.com, which has a different authority component.
http:/ is, by itself, a valid URI with a scheme, an empty authority component, and a path (/). However, it is a prefix of the URI http://example.com, which has a different authority component.
Also, the spec says that:
The resulting parsed tag is the concatenation of the prefix and the suffix, and must either begin with “!” (a local tag) or be a valid URI (a global tag).
If a processor encounters a global tag that is not a valid URI, should it raise an error? If so, at what point in the loading process should the error be raised?
The text was updated successfully, but these errors were encountered:
The simplest way to go for 1.2.1 would be to say that a global prefix should contain the scheme, but to say nothing about the authority.
If we really want to keep the authority part, we might say that a global prefix should not be the prefix of any two URIs with different authority components. This would disallow tag:, http://example.com, and http:/, but would allow tag:foo and http://example.com/. I think that this is much too conservative, but I'm not sure what alternative we could unambiguously specify.
The spec says the following about global tag prefixes:
What is a “valid URI prefix”? Is it any string that is the prefix of some valid URI? And what does it mean to “contain at least… the authority”? Typically global URI tags use the Tag URI scheme, which always has an empty authority component. (In
tag:yaml.org,2002:bool
, the authority is empty and the path isyaml.org,2002:bool
.) Should this be interpreted to mean that the prefix should uniquely specify the authority, so that every possible URI beginning with the prefix has the same authority? If so, i think this would be equivalent to requiring that the URI contain at least one character from the path, query, or fragment components.A few examples:
tag:
includes the scheme, but no authority. It could be the prefix of a URI with an authority, which would be valid as a URI but invalid as a Tag URI.tag:foo
does not include an authority component, but one must presume it to be a valid URI prefix.http://example.com
includes an authority component, but it is a prefix ofhttp://example.com.example.com
, which has a different authority component.http:/
is, by itself, a valid URI with a scheme, an empty authority component, and a path (/
). However, it is a prefix of the URIhttp://example.com
, which has a different authority component.Also, the spec says that:
If a processor encounters a global tag that is not a valid URI, should it raise an error? If so, at what point in the loading process should the error be raised?
The text was updated successfully, but these errors were encountered: