zazuko / xrm

A friendly language for mappings to RDF
MIT License
1 stars 0 forks source link

Cannot use term schema:encoding #139

Closed tpluscode closed 2 years ago

tpluscode commented 2 years ago

I added the term https://schema.org/encoding to my mapping vocabulary. XRM does not like that and says

vocabulary schema {
  prefix "schema" "http://schema.org/"

  properties
    encoding
-   ^^^^^^^^
-   extraneous input 'encoding' expecting RULE_BLOCK_END(org.eclipse.xtext.diagnostics.Diagnostic.Syntax)
}

I tried escaping as "encoding" but then. I get 3 errors when used

map foo from bar {
  properties
    schema.encoding from bar
-   ^^^^^^^^^^^^^^^
-   Couldn't resolve reference to RdfProperty 'schema'.(org.eclipse.xtext.diagnostics.Diagnostic.Linking)
-   mismatched input 'encoding' expecting RULE_ID(org.eclipse.xtext.diagnostics.Diagnostic.Syntax)
}

As a workaround I added this weird extra vocab. Any better way?

vocabulary schemaen {
  prefix "schemaen" "http://schema.org/en"

  properties
    coding
}
ktk commented 2 years ago

See special identifiers and escaping, probably used within XRM itself.

tpluscode commented 2 years ago

Of course, that was it. Thanks