<% RS = Server.CreateObject("ADODB.Recordset") mbox=Request.ServerVariables('Query_String') Response.ContentType="application/rdf+xml" Response.Write('\n\n') sqlstr='SELECT b.obj FROM rdfnew b, rdfnew a WHERE b.pred like "http://xmlns.com/foaf/0.1/name" and (b.subj=a.subj and a.pred like "http://xmlns.com/foaf/0.1/mbox") and a.obj="'+mbox+'" limit 1' RS.Open(sqlstr,"rdf") if (!RS.EOF) { Response.Write(''+RS.Fields(0)+'') } try { RS.Close() } catch (e) { } sqlstr='SELECT distinct c.subj FROM rdfnew b, rdfnew a, rdfnew c WHERE b.pred like "http://xmlns.com/foaf/0.1/knows" and (a.subj=b.subj and a.pred like "http://xmlns.com/foaf/0.1/mbox") and (c.subj=b.obj and c.pred like "http://xmlns.com/foaf/0.1/mbox") and a.obj="'+mbox+'"' RS.Open(sqlstr,"rdf") if (!RS.EOF) { Arr=RS.getRows().toArray() for (i=0;i\n') } } } Response.Write('\n') %>