(Posting after consultation with @mgh128 and @philarcher)
Old-style CBV namespaces used COLON as separator between namespace and local name e.g. the last colon in urn:epcglobal:cbv:bizstep:shipping.
New-style CBV namespaces use DASH, eg cbv:BizStep-shipping, gs1:MT-Temperature, etc.
DASH is a poor choice of such separator because it is used on par with alphanumerics in forming local names (URI components), and using it as separator goes against the grain of some important specs:
SLASH serves each resource separately; and is interpreted as "a folder of items"
HASH causes the server to serve all resources at once because the client doesn't send the part after HASH (the anchor name); and is interpreted as "a section in a document"
JSON-LD section Compact IRIs: search for gen-delim and the new keyword "@prefix" (see example 36 and following). It refers to RFC3986 for the delimiters to be used to separate a namespace from the local names in that namespace:
The rules for expanding BASE in XML and Turtle are the same: the part after the last gen-delim is thrown away. Eg try this at https://rdf-translator.appspot.com/#tabs_box (input N3, output NTriples):
@base <http://example.org/wrongPrefix->.
<foo> <bar> <baz>.
# prefix is lost, expanded to:
# <http://example.org/foo> <http://example.org/bar> <http://example.org/baz> .
@base <http://example.org/rightPrefix/>.
<foo> <bar> <baz>.
# prefix is kept, expanded to:
# <http://example.org/rightPrefix/foo> <http://example.org/rightPrefix/bar> <http://example.org/rightPrefix/baz> .
COLON is also used sometimes. It has the benefit that it can be used in prefixed names in Turtle, eg:
@prefix epcis: <https://ns.gs1.org/epcis/>.
@prefix cbv: <https://ns.gs1.org/cbv/>.
# COLON delimiter
_:event1 epcis:bizStep cbv:BizStep:shipping. # use COLON in local name
@prefix cbv-BizStep: <https://ns.gs1.org/cbv/BizStep:>.
_:event2 epcis:bizStep cbv-BizStep:shipping. # use longer prefix: same result
# SLASH delimiter
#_:event3 epcis:bizStep cbv:BizStep/shipping. # SLASH is INVALID in local name
@prefix cbv-BizStep: <https://ns.gs1.org/cbv/BizStep/>.
_:event4 epcis:bizStep cbv-BizStep:shipping. # use longer prefix... but we don't want so many prefixes
After discussion and a vote 5 to 7, it was decided not to change DASH to SLASH because gs1 Voc has a number of codelists that use dash, and two of our codelists (gs1:MT-, gs1:AT-) living there.
(Posting after consultation with @mgh128 and @philarcher)
Old-style CBV namespaces used COLON as separator between namespace and local name e.g. the last colon in
urn:epcglobal:cbv:bizstep:shipping
. New-style CBV namespaces use DASH, eg cbv:BizStep-shipping, gs1:MT-Temperature, etc.DASH is a poor choice of such separator because it is used on par with alphanumerics in forming local names (URI components), and using it as separator goes against the grain of some important specs:
gen-delim
and the new keyword"@prefix"
(see example 36 and following). It refers to RFC3986 for the delimiters to be used to separate a namespace from the local names in that namespace:DASH is explicitly listed as a char to be used in local names (URI components):
The use of DASH is the reason for the part
BizStep-
being dropped in my proposed example in https://github.com/gs1/EPCIS/pull/275#issuecomment-865043230.The rules for expanding BASE in XML and Turtle are the same: the part after the last gen-delim is thrown away. Eg try this at https://rdf-translator.appspot.com/#tabs_box (input N3, output NTriples):
COLON is also used sometimes. It has the benefit that it can be used in prefixed names in Turtle, eg:
However, there seems to be a bug in the JSONLD Playground https://github.com/digitalbazaar/jsonld.js/issues/455 so only SLASH is handled correctly but not HASH or COLON.