Prefix is the short name for the first part of an IRI.

*prefix*
> A prefix is the first component of a compact IRI which comes from a term
> that maps to a string that, when prepended to the suffix of the compact
> IRI, results in an IRI.

   --- https://www.w3.org/TR/json-ld11/#json-ld-specific-term-definitions

 A name of the form *prefix:suffix* should be interpreted as a IRI
> consisting of the IRI associated with the prefix concatenated with the
> suffix.

  --- https://www.w3.org/TR/rdf-schema/

The @context entry should define the prefix as the first part of the golang
IRI; the NamespaceMap is a more verbose way of saying the same thing.
In either case the prefix IRI must end in a separator (e.g., "/") so that
the prefix and suffix can be concatenated.

"golang-dist": "https://golang.org/dl/
<https://golang.org/dl/go1.16.5.linux-amd64-sbom>"


Then the SBOM element would be abbreviated with a colon (*prefix:suffix*)
as:

"@id": "golang-dist:go1.16.5.linux-amd64-sbom"
"@type": "software:SBOM"


which is expanded by concatenating to get the unabbreviated Element id:

"@id": " https://golang.org/dl/go1.16.5.linux-amd64-sbom";
"@type": "software:SBOM"


v/r,
Dave


On Thu, Sep 23, 2021 at 7:19 PM Nisha Kumar <[email protected]> wrote:

> This thread is to discuss William's question no 2. from the original post:
>
> * Adding a NamespaceMap property on Collection allows us to roundtrip
> prefix to namespace mappings across formats, any strong opinions on not
> having this?
>
> I am trying to remember what the "prefix" is. Is it a "short name" or
> "key" to the full namespace?
>
> I've been trying to describe the use case of the golang distribution (For
> example, a tar.gz that is downloaded from
> https://golang.org/dl/go1.16.5.linux-amd64.tar.gz).
> Assuming:
> 1. The SBOM is a ContextualCollection with a NamespaceMap
> 2. The NamespaceMap has the prefix: golang-dist and the namespace:
> https://golang.org/dl
> 3. A ContextualCollection is an Element
>
> What would the SBOM's ID be? Would it be
> golang-dist/go1.16.5.linux-amd64-sbom or the whole IRI like
> https://golang.org/dl/go1.16.5.linux-amd64-sbom?
>


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#4209): https://lists.spdx.org/g/Spdx-tech/message/4209
Mute This Topic: https://lists.spdx.org/mt/85827323/21656
Group Owner: [email protected]
Unsubscribe: https://lists.spdx.org/g/Spdx-tech/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to