Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix Definition #73

Open
marqh opened this issue Oct 18, 2017 · 4 comments
Open

Prefix Definition #73

marqh opened this issue Oct 18, 2017 · 4 comments

Comments

@marqh
Copy link
Member

marqh commented Oct 18, 2017

Should a prefix definition include the double underscore character, so that cat prefix alias results in a URI?

  • this is current behaviour

Or

Should the prefix separator be part of the standard, and not be included in the prefix definition

  • this would require a code change and changes to the examples
@marqh
Copy link
Member Author

marqh commented Oct 18, 2017

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#" ;

@marqh
Copy link
Member Author

marqh commented Oct 18, 2017

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.

@jyucsiro
Copy link
Contributor

jyucsiro commented Nov 8, 2017

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"
}
},
...
}

@jyucsiro
Copy link
Contributor

jyucsiro commented Nov 8, 2017

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:

  • Requires less characters and therefore might result in less user entered errors.

Cons:

  • Does mean a bit more processing by the bald library (and a code change/change to examples).

The double underscore pattern - pros:

  • movable to other parts of the netCDF headers, i.e. outside of a variable which solely contains "bald_prefixes".
  • current behaviour

Cons

  • Could result in user errors? Extraneous characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants