rdf-mt/commit
Generate proper literal type
author | Jan Wielemaker |
---|---|
Tue Dec 17 12:42:03 2013 +0100 | |
committer | Jan Wielemaker |
Tue Dec 17 12:42:03 2013 +0100 | |
commit | 7e58ef74f5cd22664786a7d16c08cc22688c2fc5 |
tree | 5cc56f2cd5a2cb2411137da509b7a12e777ee878 |
parent | 60fe8afb1cd2991d9de70d0773ccfa1cc1953332 |
Diff style: patch stat
diff --git a/lib/rdf_mt/mt_rdfs.pl b/lib/rdf_mt/mt_rdfs.pl index 45b4e28..dfe703f 100644 --- a/lib/rdf_mt/mt_rdfs.pl +++ b/lib/rdf_mt/mt_rdfs.pl @@ -45,15 +45,20 @@ Terminology: % rdfs1 @@ % any IRI aaa in D ==> aaa rdf:type rdfs:Datatype . +literal_type(type(Type, _), Type) :- !. +literal_type(lang(_, _), rdf:langString) :- !. +literal_type(_Plain, xsd:string). + rdfs1 @@ { S, P, L } ==> - L = literal(_), + L = literal(LV), \+ ( rdf(S,P,BN), rdf_is_bnode(BN) ), + literal_type(LV, Type), rdf_bnode(BN), { S, P, BN }, - { BN, rdf:type, rdfs:'Literal' }. + { BN, rdf:type, Type }. rdfs2 @@ { A, rdfs:domain, X },