packages-semweb icon indicating copy to clipboard operation
packages-semweb copied to clipboard

Prefix expansion does not work in rdf11 hooks

Open wouterbeek opened this issue 8 years ago • 0 comments

Is it possible to use RDF prefix expansion in predicates that are hooks in semweb/rdf11?

In the following example, I try to add a clause to the hooks in rdf11, but these added clauses are never used because the datatype argument xsd:string is not expanded.

:- use_module(library(semweb/rdf11)).

:- multifile
    in_ground_type_hook/3,
    out_type_hook/3.

:- rdf_meta
    in_ground_type_hook(r,+,-),
    out_type_hook(r,-,+).

in_ground_type_hook(xsd;string, Atom, String) :-
  atom_string(Atom, String).

out_type_hook(xsd:string, Atom, String) :-
  atom_string(Atom, String).

wouterbeek avatar Sep 29 '17 16:09 wouterbeek