Skip to content

Commit

Permalink
Merge pull request #529 from VisLab/develop
Browse files Browse the repository at this point in the history
Clarified namespace prefix and changed error to TAB_NAMESPACE_PREFIX_…
  • Loading branch information
VisLab authored Jun 1, 2023
2 parents 01bc84c + 437e9d9 commit 33f48d2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions docs/source/03_HED_formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -702,23 +702,23 @@ particularly when a long or intermediate form of the tag is used.
For this reason the [**TAG_EXTENDED**](./Appendix_B.md#tag_extended)
warning is issued for extended tags during validation.

### 3.2.6. Tag prefixes
### 3.2.6. Tag namespace prefixes

Users may select tags from multiple schemas,
but additional schemas must be included in the HED version specification.

Users are free to use any alphabetic prefix and associate it with a specific
schema in the HED version specification.
Tags from the associated schema must be prefixed with this name (followed by a colon)
Tags from the associated schema must be prefixed with this namespace designator (including the colon)
when used in annotation.

Terms from only one schema can appear in the annotation without a namespace prefix followed by a colon.

See [**TAG_PREFIX_INVALID**](./Appendix_B.md#tag_prefix_invalid)
See [**TAG_NAMESPACE_PREFIX_INVALID**](./Appendix_B.md#tag_namespace_prefix_invalid)
for information on the specific validation errors associated with missing schemas.

See [**7.4. Library schema in BIDS**](./07_Library_schemas.md#74-library-schemas-in-bids) for an example of how the
prefix notation is used in BIDS.
namespace prefix notation is used in BIDS.


### 3.2.7. Strings and groups
Expand Down
6 changes: 3 additions & 3 deletions docs/source/06_Infrastructure_and_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ It is possible to include library schema in the HED version specification of the
````

The version specification indicates that tags from the `score` library must be prefixed with `sc:`
in dataset HED annotations.
namespace identifier in dataset HED annotations.

The prefix notation (such as the `sc:` prefix for the `score` library in the previous example is required when more than one schema is used in the annotation.
However, prefixes can be used with the standard schema as well as library schemas
However, namespace prefixes can be used with the standard schema as well as library schemas
as illustrated by the following example.

````{admonition} **Example:** Prefixed standard schema in BIDS dataset description version specification.
Expand All @@ -232,7 +232,7 @@ as illustrated by the following example.

For this specification tags from the standard schema must be prefixed
by `st:`, while tags from the `score` library are unprefixed.
The `sc:` and `st:` prefixes are arbitrary (usually short) alphabetic strings
The `sc:` and `st:` namespace prefixes are arbitrary (usually short) alphabetic strings
chosen by the annotation and are specific to each dataset based on its
version specification.

Expand Down
8 changes: 4 additions & 4 deletions docs/source/07_Library_schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ a standard schema and a library schema, thus requiring that a `xx:` be assigned
one of the schemas when standalone library schemas are used.

Because a partnered library schema is merged with a standard schema to form a single, unified schema,
users can annotate data without the `xx:` prefix.
users can annotate data without the `xx:` namespace designator.
The `xx:` is still needed if more than one library schema is used.

#### 7.2.5.4. Library searches
Expand Down Expand Up @@ -405,11 +405,11 @@ Since it would be impossible to avoid naming conflicts across schema libraries b
HED supports schema library namespaces to facilitate the use of multiple schemas in
annotating a datasets..

If multiple schemas are used, users must define a local prefix for
If multiple schemas are used, users must define a local namespace for
each additional schema and prefix the tags from each of these
additional schemas by their respective prefix in annotations.
additional schemas by their respective namespace in annotations.
The local names should be strictly alphabetic with no blanks or punctuation.
If a tag prefix is invalid in the version specification,
If a tag namespace prefix is invalid in the version specification,
a schema loading error occurs.


Expand Down
18 changes: 9 additions & 9 deletions docs/source/Appendix_B.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,22 +270,22 @@ for additional information on the rules for group errors due to schema attribute
See [**3.2.2. Tag forms**](./03_HED_formats.md#322-tag-forms) for a discussion
of tag forms and their relationship to the HED schema.

### TAG_NAMESPACE_PREFIX_INVALID

**a.** A tag starting with *name:* does not have an associated schema.
**b.** A tag prefix has invalid characters.

See [**3.2.6. Tag namespace prefixes**](./03_HED_formats.md#326-tag-namespace-prefixes) and
[**7. Library schema**](./07_Library_schemas.md) for additional information
on using multiple schemas in annotation.

### TAG_NOT_UNIQUE

**a.** A tag with `unique` attribute appears more than once in an event-level HED string.

See [**3.2.10.2. Event-level processing**](./03_HED_formats.md#32102-event-level-processing) for
additional information on the `unique` tag.

### TAG_PREFIX_INVALID

**a.** A tag starting with *name:* does not have an associated schema.
**b.** A tag prefix has invalid characters.

See [**3.2.6. Tag prefixes**](./03_HED_formats.md#326-tag-prefixes) and
[**7. Library schema**](./07_Library_schemas.md) for additional information
on using multiple schemas in annotation.

### TAG_REQUIRES_CHILD

**a.** A tag has the `requireChild` schema attribute but does not have a child.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"error_code": "TAG_PREFIX_INVALID",
"name": "tag-prefix-invalid-no-schema",
"error_code": "TAG_NAMESPACE_PREFIX_INVALID",
"name": "tag-namespace_prefix-invalid-no-schema",
"description": "A tag starting with name: does not have an associated schema.",
"schema": ["8.1.0", "sc:score_1.0.0"],
"definitions": ["(Definition/Acc/#, (Acceleration/#, Red))", "(Definition/MyColor, (Label/Pie))"],
Expand Down Expand Up @@ -92,8 +92,8 @@
}
},
{
"error_code": "TAG_PREFIX_INVALID",
"name": "tag-prefix-invalid-characters",
"error_code": "TAG_NAMESPACE_PREFIX_INVALID",
"name": "tag-namespace_prefix-invalid-characters",
"description": "A tag prefix has invalid characters.",
"schema": ["8.1.0", "sc:score_1.0.0"],
"definitions": ["(Definition/Acc/#, (Acceleration/#, Red))", "(Definition/MyColor, (Label/Pie))"],
Expand Down

0 comments on commit 33f48d2

Please sign in to comment.