diff --git a/32.md b/32.md index fcf6082c..45cadbe7 100644 --- a/32.md +++ b/32.md @@ -26,7 +26,7 @@ Label Tag This NIP introduces a new tag `l` which denotes a label, and a new `L` tag which denotes a label namespace. A label MUST include a mark matching an `L` tag. `L` tags refer to a tag type within nostr, or a nomenclature external to nostr defined either formally or by convention. Any string can be a namespace, but publishers SHOULD -ensure they are unambiguous by using a well-defined ISO standard or reverse domain name notation. Some examples: +ensure they are unambiguous by using a well-defined namespace (such as an ISO standard) or reverse domain name notation. Some examples: Namespaces starting with `#` indicate that the label target should be associated with the label's value. This is a way of attaching standard nostr tags to events, pubkeys, relays, urls, etc. @@ -36,8 +36,8 @@ This is a way of attaching standard nostr tags to events, pubkeys, relays, urls, - `["l", "D005528", "MeSH"]` - ["Foot"](https://meshb.nlm.nih.gov/record/ui?ui=D005528) from NIH's Medical Subject Headings vocabulary - `["l", "3173435", "GeoNames"]` - [Milan, Italy](https://www.geonames.org/3173435/milan.html) using the GeoNames coding system - `["l", "IT-MI", "ISO-3166-2"]` - Milano, Italy using ISO 3166-2. -- `["l", "VI-hum", "social.nos.ontology"]` - Violence toward a human being as defined by ontology.nos.social. -- `["l", "relay/review", "social.coracle.ontology"]` - the publisher is leaving a review about a relay, as defined by ontology.coracle.social. +- `["l", "VI-hum", "com.example.ontology"]` - Violence toward a human being as defined by ontology.example.com. +- `["l", "relay/review", "com.example.ontology"]` - the publisher is leaving a review about a relay, as defined by ontology.example.com. `L` tags containing the label namespaces MUST be included in order to support searching by namespace rather than by a specific tag. The special `ugc` ("user generated content") namespace @@ -128,8 +128,8 @@ A plain review of a relay. { "kind": 1985, "tags": [ - ["L", "social.coracle.ontology"], - ["l", "relay/review", "social.coracle.ontology", "{\"quality\": 0.1}"], + ["L", "com.example.ontology"], + ["l", "relay/review", "com.example.ontology", "{\"quality\": 0.1}"], ["r", ] ], "content": "This relay is full of mean people.", @@ -161,8 +161,8 @@ Publishers can self-label by adding `l` tags to their own non-1985 events. { "kind": 1, "tags": [ - ["L", "social.nos.ontology"], - ["l", "IL-frd", "social.nos.ontology"] + ["L", "com.example.ontology"], + ["l", "IL-frd", "com.example.ontology"] ], "content": "Send me 100 sats and I'll send you 200 back", ... @@ -175,3 +175,14 @@ Other Notes When using this NIP to bulk-label many targets at once, events may be deleted and a replacement may be published. We have opted not to use parameterizable/replaceable events for this due to the complexity in coming up with a standard `d` tag. + +Before creating a vocabulary, explore how your use case may have already been designed and +imitate that design if possible. Reverse domain name notation is encouraged to avoid +namespace clashes, but for the sake of interoperability all namespaces should be +considered open for public use, and not proprietary. In other words, if there is a +namespace that fits your use case, use it even if it points to someone else's domain name. + +Vocabularies MAY choose to include the namespace in the label, delimited by a `:` character. +This may be preferred when defining more formal vocabularies that should not be confused with +another namespace when querying without an `L` tag. For these vocabularies, all labels +SHOULD include the namespace (rather than mixing qualified and unqualified labels).