Uncaught exception 'EasyRdf_Exception' with message 'No URI given to load() and the graph does not have a URI.' in C:\wamp\www\app\rdf\EasyRdf\Graph.php on line 275

Skip to first unread message

Rabia Majeed

Nov 8, 2017, 5:47:13 PM11/8/17
to EasyRdf Discussion
after using local rdf xml file, i got this error
code is

$graph = new EasyRdf_Graph(); 
$me = $graph->primaryTopic();
echo "My name is: ".$me->get('fd:name')."\n";

Nicholas Humfrey

Nov 8, 2017, 5:58:38 PM11/8/17
to EasyRdf Discussion
Hello Rabia,

$graph->load() is used to download RDF from a URL - it is not needed when parsing a local file.
$graph->parseFile("profile.rdf") will do what you need it to do.

Without seeing the contents of profile.rdf is is hard to know exactly what is going wrong.
However 'fd' is not a standard namespace that EasyRDF knows about.

There is a list of default namespaces in RdfNamespace.php:

Maybe you meant to use foaf?


Rabia Majeed

Nov 9, 2017, 12:54:28 AM11/9/17
to EasyRdf Discussion
these are some contents of rdf file

<?xml version="1.0"?>
  <fd:post>HOD, CIIT Islamabad</fd:post>
  <fd:phone>+92 51 1234 5678</fd:phone>

Reply all
Reply to author
0 new messages