Re: Semantic actions and non-javascript implementations

The semantic actions do not depend on Javascript. The first part of a
semantic action describes the language in which that semantic action is
expressed. It is possible to express semantic actions in different
languages like javascript, sparql, etc.

For example:

<issue> { ex:reportedOn xsd:dateTime %js{ report = _.o; return true; %},
 ( ex:reproducedBy @<EmployeeShape>,  ex:reproducedOn xsd:dateTime
   %js{ return _.o.lex > report.lex; %}
   %sparql{ ?s ex:reportedOn ?rpt .
             FILTER (?o > ?rpt) %}
 )?
}

The JS implementation can also handle GenX and GenJ, two small languages
that can generate XML and Json, so they can be used to transform RDF to
both XML and Json in a very easy way.

Currently Shexcala does not yet support semantic actions, although we are
planning to support them in the future.

Also, as we are also planning to compile Shexcala to ScalaJS, it should be
possible to handle Javascript semantic actions.

Best regards, Jose Labra

Received on Monday, 26 May 2014 13:05:59 UTC