From: <tob...@we...> - 2006-01-31 07:33:37
|
Hi Luigi, in your query the colon after 'foaf' in the PREFIX clause is missing.' Try this query string: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name WHERE { ?x foaf:name ?name } Regards, Tobias >Send Rdfapi-php-interest mailing list submissions to > rdf...@li... > >To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest >or, via email, send a message with subject or body 'help' to > rdf...@li... > >You can reach the person managing the list at > rdf...@li... > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of Rdfapi-php-interest digest..." > > >Today's Topics: > > 1. SPARQL FOAF file (Luigi Selmi) > 2. Re: SPARQL FOAF file (Benjamin Nowack) > >--__--__-- > >Message: 1 >From: "Luigi Selmi" <sel...@ho...> >To: rdf...@li... >Date: Mon, 30 Jan 2006 14:09:43 +0000 >Subject: [Rdfapi-php-interest] SPARQL FOAF file > ><html><div style='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="http://www.ldodds.com/foaf/foaf-a-matic.html">http://www.ldodds.com/foaf/foaf-a-matic.html</A>):</P> ><P><rdf:RDF<BR> xmlns:rdf="<A href="http://www.w3.org/1999/02/22-rdf-syntax-ns">http://www.w3.org/1999/02/22-rdf-syntax-ns</A>#"<BR> xmlns:rdfs="<A href="http://www.w3.org/2000/01/rdf-schema">http://www.w3.org/2000/01/rdf-schema</A>#"<BR> xmlns:foaf="<A href="http://xmlns.com/foaf/0.1/">http://xmlns.com/foaf/0.1/</A>"<BR> xmlns:admin="<A href="http://webns.net/mvcb/">http://webns.net/mvcb/</A>"><BR><foaf:PersonalProfileDocument rdf:about=""><BR> <foaf:maker rdf:resource="#me"/><BR> <foaf:primaryTopic rdf:resource="#me"/><BR> <admin:generatorAgent rdf:resource="<A href='http://www.ldodds.com/foaf/foaf-a-matic"/'>http://www.ldodds.com/foaf/foaf-a-matic"/</A>><BR> <admin:errorReportsTo rdf:resource="<A >href='mailto:le...@ld..."/'>mailto:le...@ld..."/</A>><BR></foaf:PersonalProfileDocument><BR><foaf:Person rdf:ID="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:mbox_sha1sum>799ffcad6c44171ef4ec2d863d7cd9aca869982c</foaf:mbox_sha1sum><BR><foaf:workplaceHomepage rdf:resource="<A href='http://www.sharesemantics.com"/></foaf:Person'>http://www.sharesemantics.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=2> ><P>// Show the input model</P> ><P>$model->writeAsHtmlTable();</P></FONT><FONT size=2> ><P>PREFIX foaf <http://xmlns.com/foaf/0.1/></P> ><P>SELECT ?name</P> ><P>WHERE { </FONT><FONT face="Times New Roman" size=3>?x</FONT><FONT size=2> foaf:name ?name</P> ><P>}';</P> ><P>// Execute the query</P> ><P>$result = $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=#0033cc></FONT> </P></DIV></div></html> > > > >--__--__-- > >Message: 2 >Date: Mon, 30 Jan 2006 15:45:17 +0100 >To: "Luigi Selmi" <sel...@ho...> >Cc: rdf...@li... >From: Benjamin Nowack <bn...@ap...> >Subject: Re: [Rdfapi-php-interest] SPARQL FOAF file >Organization: appmosphere web applications > > >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 >> >> >> >> > > > > >--__--__-- > >_______________________________________________ >Rdfapi-php-interest mailing list >Rdf...@li... >https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > > >End of Rdfapi-php-interest Digest > > |