Open marqh opened 6 years ago
for example: https://github.com/binary-array-ld/bald/blob/master/lib/bald/tests/integration/CDL/array_reference.cdl#L13
prefix_list:bald__ = "http://binary-array-ld.net/latest/" ;
prefix_list:rdf__ = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" ;
should the double underscore __
always be implied? Such that
prefix_list:bald = "http://binary-array-ld.net/latest/" ;
prefix_list:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" ;
For comparison, the terse triple language (ttl) includes the prefix separator (':') in the prefix definition: https://github.com/binary-array-ld/bald/blob/master/lib/bald/tests/integration/TTL/array_reference.ttl#L1
@prefix bald: <http://binary-array-ld.net/latest/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
I suspect it was this pattern that we initially adopted.
The other pattern relevant here for the alternative approach is taken from JSON-LD - see https://json-ld.org/spec/latest/json-ld/
Example: { "@context": { "foaf": "http://xmlns.com/foaf/0.1/", "xsd": "http://www.w3.org/2001/XMLSchema#", "name": "foaf:name", "foaf:age": { "@id": "foaf:age", "@type": "xsd:integer" }, "http://xmlns.com/foaf/0.1/homepage": { "@type": "@id" } }, ... }
The current proposal is to provide prefixes in a variable such as "bald_prefixes". In this case the parser knows where to get the prefixes from so not having the double underscore in a prefix declaration is not a problem.
Pros might be:
Cons:
The double underscore pattern - pros:
Cons
Should a prefix definition include the double underscore character, so that
cat prefix alias
results in a URI?Or
Should the prefix separator be part of the standard, and not be included in the prefix definition