kg-construct / rml-lv

Specification repository for logical views in RML.
https://kg-construct.github.io/rml-lv/dev.html
3 stars 3 forks source link

How to avoid syntax clashes #1

Closed thomas-delva closed 7 months ago

thomas-delva commented 2 years ago

If there is a field declaration like

<LS> rml:field [
  rml:name "id" ;
  rml:reference "$.some.ref[erence]"

it would be used in a template like:

<TermMap> rr:template "http://example.org/{id}"

but this is ambiguous: while {id} in this template indicates the field is used, the same {id} could indicate that a reference id should be used. How can an engine know which of the two to use?

Solutions that were discussed:

  1. Have a "fall-through syntax" or precedence rule, i.e. {id} indicates a field if a field with that name is defined, and indicates a reference otherwise.
  2. Have a better, non-colliding syntax. For example using double braces if a field is indicated, i.e. {{id}}. -> this needs to be thought out
  3. Use other properties than rr:template and rml:reference if fields are used, e.g. rml:fieldTemplate, rml:fieldReference. -> this means fields and references cannot be mixed
bjdmeest commented 7 months ago

name clashes cannot happen as logicalview has its own reference formulation: https://kg-construct.github.io/rml-lv/dev.html#logicalviews