Skip to content

Commit 3238711

Browse files
committed
doc: added TEI examples (for discussion) and made clearer that unique-identifier is required to be unique only within the domain-name scope
Signed-off-by: Paul Horton <[email protected]>
1 parent c1abdcd commit 3238711

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed

discovery/readme.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,19 @@ to global uniqueness without new registries.
3434
The TEI can be shown in the software itself, in shipping documentation, in web pages and app stores.
3535
TEI is unique for a product, not a version of a software. The TEI consist of three core parts
3636

37-
- The **type** which defines the syntax of the unique identifier part
38-
- The **domain name** part does not have to exist as a web server (HTTPS).
39-
- The uniqueness of the name is the domain name part that has to be registred at creation of the TEI.
40-
- The **unique identifier** has to be unique within the domain. Recommendation is to use UUID,
41-
but it can be an existing article code too.
37+
- The **`type`** which defines the syntax of the unique identifier part
38+
- The **`domain-name`** part does not have to exist as a web server (HTTPS).
39+
- The uniqueness of the name is the domain name part that has to be registred at creation of the TEI.
40+
- The **`unique-identifier`** has to be unique within the `domain-name`.
41+
- Recommendation is to use UUID, but it can be an existing article code too.
4242

4343
A TEI belongs to a single product. A product can have multiple TEIs - like one with a EAN
4444
bar code and one with the vendor's product number.
4545

4646
### TEI syntax
4747

48-
4948
```
50-
urn:tei:<type>:<domain>:<unique-identifier>
49+
urn:tei:<type>:<domain-name>:<unique-identifier>
5150
````
5251
5352
**Note**: this requires a registration of the TEI URN schema with IANA.
@@ -60,44 +59,64 @@ urn:tei:<type>:<domain>:<unique-identifier>
6059
6160
### TEI types
6261
62+
The below show examples of TEI where the types are specific known formats or types.
63+
64+
Reminder: the `unique-identifer` component of the TEI needs only be unique within the `domain-name`.
65+
6366
#### PURL - Package URL
6467
68+
Where the `unique-identifier` is a PURL in it's canonical string form.
69+
6570
Syntax:
6671
6772
```text
68-
urn:tei:purl:<domain or host>:<purl>
73+
urn:tei:purl:<domain-name>:<purl>
6974
````
7075
76+
Example:
77+
```text
78+
urn:tei:org.cyclonedx:pkg:pypi/[email protected]?extension=whl&qualifier=py3-none-any
79+
```
80+
7181
#### SWID
7282

83+
Where the `unique-identifier` is a SWID.
84+
7385
Syntax:
7486

7587
```text
76-
urn:tei:swid:<domain or host>:<swid>
88+
urn:tei:swid:<domain-name>:<swid>
7789
````
7890
7991
Note that there is a TEI SWID type as well as a PURL SWID type.
8092
8193
#### HASH
8294
83-
Supports the following hash values:
95+
Where the `unique-identifier` is a Hash. Supports the following hash types:
8496
8597
* SHA256
8698
* SHA384
8799
* SHA512
88100
89101
```text
90-
urn:tei:hash:<domain or host>:<hashtype>:<hash>
102+
urn:tei:hash:<domain-name>:<hashtype>:<hash>
91103
````
92104
105+
Example:
106+
```text
107+
urn:tei:org.cyclonedx:SAH256:fd44efd601f651c8865acf0dfeacb0df19a2b50ec69ead0262096fd2f67197b9
108+
```
109+
93110
The origin of the hash is up to the vendor to define.
94111

95112
#### UUID
96113

114+
Where the `unique-identifier` is a UUID.
115+
97116
Syntax:
98117

99118
```text
100-
urn:tei:uuid:<domain or host>:<uuid>
119+
urn:tei:uuid:<domain-name>:<uuid>
101120
````
102121
103122
Has to be a valid UUID.

0 commit comments

Comments
 (0)