Skip to content

detecting syntax error on SHACL SPARQL Rule ? #18

@benellefi

Description

@benellefi

it seems that the current LSP does not validate the syntax of SPARQL queries within sh:SPARQLRule (?)
Invalid SPARQL syntax goes undetected.

Example:

turtle
@Prefix ex: http://example.org/.
@Prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# .
@Prefix rdfs: http://www.w3.org/2000/01/rdf-schema# .
@Prefix sh: http://www.w3.org/ns/shacl# .
@Prefix xsd: http://www.w3.org/2001/XMLSchema# .
@Prefix ed: <./owl.ttl#>.

ed:LanguageFeatureShape
a sh:NodeShape;
sh:targetClass ed:Feature, ed:Hover, ed:Completion;
sh:rule [
a sh:SPARQLRule ;
sh:construct """
CONSTRUCT {
$this ...
}
WHERE {
n'importe quoi ;
.
a.
}
"""
].

Expected Behavior:

  • The invalid SPARQL syntax in the WHERE clause-
  • The malformed triple patterns-
  • The incomplete CONSTRUCT template

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions