From: Benjamin N. <bn...@ap...> - 2006-01-30 14:45:28
|
Hi Luigi, looks like the colon after "foaf" in the prefix declaration is missing: 'PREFIX foaf: <http://xmlns.com/foaf/0.1/>'. benjamin -- Benjamin Nowack Kruppstr. 100 45145 Essen, Germany http://www.bnode.org/ On 30.01.2006 14:09:43, Luigi Selmi wrote: ><html><div style=3D'background-color:'><P>Hi All, </P> ><P>I tried to query a foaf model using the sparl engine but it did = not >work. I made the following foaf file using the foaf-a-matic web = service >(<A >href= =3D"http://www.ldodds.com/foaf/foaf-a-matic.html">http://www.ldodds.com/fo= af/ >foaf-a-matic.html</A>):</P> ><P><rdf:RDF<BR> xmlns:rdf=3D"<A >href= =3D"http://www.w3.org/1999/02/22-rdf-syntax-ns">http://www.w3.org/1999/02/= 22- >rdf-syntax-ns</A>#"<BR> xmlns:rdfs=3D"<A >href= =3D"http://www.w3.org/2000/01/rdf-schema">http://www.w3.org/2000/01/rdf-sc= hem >a</A>#"<BR> xmlns:foaf=3D"<A >href= =3D"http://xmlns.com/foaf/0.1/">http://xmlns.com/foaf/0.1/</A>"<BR> = &nbs >p; xmlns:admin=3D"<A >href= =3D"http://webns.net/mvcb/">http://webns.net/mvcb/</A>"><BR><= foaf:Perso >nalProfileDocument rdf:about=3D""><BR> <foaf:maker >rdf:resource=3D"#me"/><BR> <foaf:primaryTopic >rdf:resource=3D"#me"/><BR> <admin:generatorAgent = rdf:resource=3D"<A >href= =3D'http://www.ldodds.com/foaf/foaf-a-matic"/'>http://www.ldodds.com/foaf/= foa >f-a-matic"/</A>><BR> <admin:errorReportsTo = rdf:resource=3D"<A >href= =3D'mailto:le...@ld..."/'>mailto:le...@ld..."/</A>><BR><= /foaf >:PersonalProfileDocument><BR><foaf:Person >rdf:ID=3D"me"><BR><foaf:name>Luigi >Selmi</foaf:name><BR><foaf:title>Mr</foaf:title>= <BR><foaf: >givenname>Luigi</foaf:givenname><BR><foaf:family_name>= Selmi</ >foaf:family_name><BR><foaf:nick>Luigi</foaf:nick><BR><= foaf:mb >ox_sha1sum>799ffcad6c44171ef4ec2d863d7cd9aca869982c<= /foaf:mbox_sha1sum> >;<BR><foaf:workplaceHomepage rdf:resource=3D"<A >href= =3D'http://www.sharesemantics.com"/></foaf:Person'>http://www.sharesemanti= cs. >com"/></foaf:Person</A>><BR></rdf:RDF></P> ><P>then I wrote the following chunk of php code to make the query and = execute >it :</P><FONT size=3D2> ><P>// Show the input model</P> ><P>$model->writeAsHtmlTable();</P></FONT><FONT size=3D2> ><P>PREFIX foaf <http://xmlns.com/foaf/0.1/></P> ><P>SELECT ?name</P> ><P>WHERE { </FONT><FONT face=3D"Times New Roman" size=3D3>?x</FONT><FONT = size=3D2> >foaf:name ?name</P> ><P>}';</P> ><P>// Execute the query</P> ><P>$result =3D $model->sparqlQuery($querystring); </P> ><P>but it never worked out. It prints out the model correctly but don't = find >the person's name . Everything goes well with vcard and dublincore = name >spaces. Maybe my query is incorrect. Can anyone give a working example? >Thanks</P> ><P>Luigi</P> ><P></FONT><BR><BR><BR> </P> ><DIV> ><P><FONT color=3D#0033cc></FONT> </P></DIV></div></html> > > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log = files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat= =3D121642 >_______________________________________________ >Rdfapi-php-interest mailing list >Rdf...@li... >https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > > |