Skip to content

Allow all URI characters in prefixed names #89

@dbooth-boston

Description

@dbooth-boston

In turtle and SPARQL, prefixed names like fhir:patient have a very limited syntax after the prefix. This means that prefix definitions can only be used to shorten URIs in very limited ways that conform to the syntax rules for local names.

For example, suppose I have these URIs:

<http://example.org/Encounter/f201>
<http://example.org/Patient/f201> 
<http://example.org/Practitioner/d444> 
<http://example.org/Practitioner/f201> 

Since they all have the http://example.org/ part in common as a prefix, it would be nice if I could define a prefix ex: like this to shorten them all:

@prefix ex: <http://example.org/> .

ex:Encounter/f201
ex:Patient/f201
ex:Practitioner/d444
ex:Practitioner/f201

But those prefixed names are not allowed in Turtle or SPARQL because slash ("/") is not allowed in a local name. It would be helpful if a prefixed name would allow any valid URI syntax after the prefix, so that URIs could be shortened more flexibly.

One might claim that the above URIs should have been designed differently, to avoid using a slash in that part of the URI, but often we do not control how the URIs are designed: they are given to us and we must deal with them as they are.

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