From: Peter B. <pb...@xs...> - 2005-02-20 19:53:21
|
Hi, The InfModelF does, among other things, type inference. If a rel b and rel range c it infers: b type c. This is nice. However, when I have a literal property a rel 'abc' and rel range http://www.w3.org/2001/XMLSchema#string it will infer: 'abc' type http://www.w3.org/2001/XMLSchema#string which obviously won't work. The error is given as: Fatal error: RDFAPI error (class: Statement; method: new): Resource expected as subject. in d:\Inetpub\wwwroot\emblems\lab\rdfapi091\rdfapi-php\api\model\Statement.php on line 66 I may of course be doing something wrong. Could someone help shed light on this? Thanks in advance, Peter Boot My very simple PHP script: <?php define("RDFAPI_INCLUDE_DIR", "d:/inetpub/wwwroot/emblems/lab/rdfapi091/rdfapi-php/api/"); include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); $im = ModelFactory::getInfModelF(); $im->load("http://emblems.let.uu.nl/emblems/lab/dse/rdf/test.rdf"); ?> My OWL and RDF data: <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xml:base="http://emblems.let.uu.nl/emblems/lab/dse/rdf/test.rdf" xmlns:test="http://emblems.let.uu.nl/emblems/lab/dse/rdf/test.rdf#" xmlns:owl = "http://www.w3.org/2002/07/owl#" xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs= "http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd = "http://www.w3.org/2001/XMLSchema#"> <owl:Ontology rdf:about=""> <rdfs:comment>Test ontology </rdfs:comment> </owl:Ontology> <owl:Class rdf:ID="MyClass"> </owl:Class> <owl:DatatypeProperty rdf:ID="StringProp"> <rdfs:domain rdf:resource="#MyClass"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </owl:DatatypeProperty> <test:MyClass rdf:ID="myid" test:StringProp="a string"> </test:MyClass> </rdf:RDF> |