Skip to content

Keyword pattern should error when used as a term #297

Closed
@gkellogg

Description

@gkellogg

As recently discussed in #296 (comment), the Create Term Definition algorithm issues a warning when a term has the pattern of a keyword, but isn't a keyword (@1*ALPHA).

The syntax document says "a term SHOULD NOT start with an @ character followed exclusively by one or more ALPHA characters".

However, the reason @version was introduced was to prevent a 1.0 processor from mis-interpreting a 1.1 context. If we want to avoid having each new version use a different value for @version (or any specific numeric value as illustrated by #296), simply ignoring such terms could leave room for future misrepresentation.

We should revert to previous usage to say that terms MUST NOT take the form of a keyword (@1*ALPHA) and generate an error. This still allows IRI-like things to be ignored with a warning, such as {"@id": "@url"} but would only prohibit @url from being used as a term, itself.

We could then modify the expected value of @version to be any numeric value (suggest 1.1, but test can simply be that it has a numeric value) and avoid potential issues in floating-point comparisons after transforming to an internal representation).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions