Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify that qualifiers must occurr at most once. #38

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Chapters/6.Qualified_identifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ as detailed in the following sections.
## 6.1 Fragment qualifiers

There are two fragment qualifiers, `lines` and `bytes`.
Each fragment qualifier MUST appear at most once.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we also say that both cannot be present, maybe we can re-word this to:

Each valid SWHID must have at most one fragment qualifier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, PR updated accordingly!


Fragment qualifiers are only valid for objects of type content.

The two fragment qualifiers are mutually exclusive: a valid SWHID MUST not contain both.
Each valid SWHID must have at most one fragment qualifier.

A conformant implementation MAY accept a SWHID that violates this constraint,
by ignoring the `lines` qualifier when the `bytes` qualifier is present.

Expand Down Expand Up @@ -55,6 +58,9 @@ does not rely on any convention about line numbers.

## 6.2 Context qualifiers

There are four context qualifiers, `origin`, `visit`, `path` and `anchor`.
Each context qualifier MUST appear at most once.

### 6.2.1 Origin qualifier

This qualifier allows to declare the *software origin* where the
Expand Down