Skip to content

turtle/sparql should allow empty comma (and dot?) just as it allows empty semicolon #91

Description

@VladimirAlexiev

Empty semicolon

This is valid:

<s>
  :p1 <o1>;
  :p2 <o2>;
.

It is useful because you don't need to tweak the last statement before you add a new one.

  • It's widely used eg by TQ (right @HolgerKnublauch?)
  • It's especially useful when you're generating turtle because you don't need to keep track which is the last statement

Empty comma

But this is not valid:

<s> :p
  <o1>,
  <o2>,
.

Here's a real example where I want it (processed a list of prefixes to make sh:declare):

@base         <https://transparency.ontotext.com/resource/>.
@prefix tr:   <https://transparency.ontotext.com/resource/tr/>.
@prefix dash: <http://datashapes.org/dash#> .

<shape> a owl:Ontology; rdfs:label 'TEKG Shapes';
  sh:declare
    [sh:prefix 'tr'; sh:namespace 'https://transparency.ontotext.com/resource/tr/'],
    [sh:prefix 'dash'; sh:namespace 'http://datashapes.org/dash#'],
.

Empty dot

Similarly, this is not valid:

.
<s> :p <o> 
.

Why would I want an empty dot? Because when generating, it's often easier to know when a block starts not necessarily when it ends.

@afs , @ericprud what do you think?

Activity

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