Re: Semantic actions and non-javascript implementations

* Jose Emilio Labra Gayo <jelabra@gmail.com> [2014-05-26 15:05+0200]
> 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) %}
>  )?
> }

I think it would make sense to have a declaration at the top mapping
these little strings to URLs (IRIs really, but I believe the term URL
is about to change to be more inclusive):

  ACTION js <http://example.org/my/crazy/scheme/>

That seems consistent with the rest of SemWeb's disambiguation.


> 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

-- 
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.

Received on Monday, 26 May 2014 13:42:16 UTC