anusii / anusii/solidpod

RDFLIB: Parsing different ttl file formats

Open
#218 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
10
Forks
7
Avg merge
1d 3h
Merged PRs (30d)
6

Description

Some turtle formats are not supported by the Rdflib parser. Following are some examples.

Example 1
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix ex: <http://example.org/stuff/1.0/> .

<http://www.w3.org/TR/rdf-syntax-grammar>
  dc:title "RDF/XML Syntax Specification (Revised)" ;
  ex:editor [
    ex:fullname "Dave Beckett";
    ex:homePage <http://purl.org/net/dajobe/>
  ] .
Example 2
@prefix : <http://example.org/stuff/1.0/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
:a :b
  [ rdf:first "apple";
    rdf:rest [ rdf:first "banana";
               rdf:rest rdf:nil ]
  ] .
Example 3
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh_data: <http://yarrabah.net/data/solid-health#> .
@prefix sh_onto: <http://sii.cecs.anu.edu.au/onto/solid-health#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
sh_data:Info-17809g89a a sh_onto:InfoTab,
        owl:NamedIndividual ;
    rdfs:label "label_name"^^xsd:string ;
    sh_onto:commentP """1. First comment.
2. Second comment.
3. Third comment."""^^xsd:string .
Example 4
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix show: <http://example.org/vocab/show/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

show:218 rdfs:label "That Seventies Show"^^xsd:string .            
show:218 rdfs:label "That Seventies Show"^^<http://www.w3.org/2001/XMLSchema#string> . 
show:218 rdfs:label "That Seventies Show" .                                           
show:218 show:localName "That Seventies Show"@en .                 
show:218 show:localName 'Cette Série des Années Soixante-dix'@fr . 
show:218 show:localName "Cette Série des Années Septante"@fr-be .  
show:218 show:blurb '''This is a multi-line
literal with many quotes (""""")
and up to two sequential apostrophes ('').'''^^xsd:string .

Note: Previously we were able to parse multi-line literals. But it seems like now we cannot. Check example 3 and example 4.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported failures with the four Turtle examples, especially the multiline literals in examples 3 and 4. Trace the RDFLib parser entry point used by the project and verify that all examples parse successfully without regressing the supported syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.