SWI-Prolog / packages-semweb

The SWI-Prolog RDF store
28 stars 14 forks source link

Prefix expansion does not work in rdf11 hooks #67

Open wouterbeek opened 6 years ago

wouterbeek commented 6 years ago

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).