Skip to content

Prefix Definition #73

Open
Open

Description

@marqh

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

Activity

  1. marqh commented on Oct 18, 2017

    @marqh
    MemberAuthor

    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#" ;
    
  2. marqh commented on Oct 18, 2017

    @marqh
    MemberAuthor

    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.

  3. jyucsiro commented on Nov 8, 2017

    @jyucsiro
    Contributor

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

  4. jyucsiro commented on Nov 8, 2017

    @jyucsiro
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions