lucmoreau/ProvToolbox

ProvValidator validates invalid PROVN

Closed this issue · 1 comments

Steps to reproduce the Issue

  1. Open [https://openprovenance.org/services/view/validator]
  2. Select provn and paste the following text into the textbox:
document
  prefix var <http://openprovenance.org/var#>
  prefix prov <http://www.w3c.org/ns/prov#>
  entity(var:entity1, [prov:label = "label1"
  entity(var:entity2, [prov:label = "label2"])
endDocument
  1. Click validate

What happened

The validator reports no issues with the provided document

What did I expect to happen

The validator should report that entity1 is syntactically incorrect, since the closing square and round bracket are missing.

Additional notes

This issue originally occurred when instantiating a provenance template via provtoolbox. In this case, not only is there no error during parsing, but the label prov:label is ignored and not included in the output file.

When translating this document to prov, we get the following result:

document
prefix pre_0 <http://www.w3c.org/ns/prov#>
prefix var <http://openprovenance.org/var#>
entity(var:entity1)
entity(var:entity2,[prov:label = "label2" %% xsd:string])
endDocument

This is a valid document.

The parser was configured to be (too) permissive. THis is the issue. There is a stricter parser in the scala implementation.