This is an automatically generated IRC chat log made by the logger bot from the Semantic Web Interest Group IRC chat at irc://irc.freenode.net/swig (also known as server irc.freenode.net channel #swig if that URI does not work for you).
See also the Semantic Web Interest Group IRC Scratchpad for the collaboratively written weblog and ESW wiki.
Semantic Web Interest Group Logs > 2005 > 2005-09 > 2005-09-06 (Latest) (Search)
00:00:22 <sbp> wow, someone read the topic!
00:58:34 <Elementalistmage> hey
02:23:00 <myren> is there an emoticon namespace?
02:23:30 <myren> <inquire xmlns="urn:alienintels.com:myren:emoticons"/>
03:01:48 <chimezie_> chimezie_ is now known as chimezie
03:22:37 <crschmidt> myren: not that I'm aware of
03:43:10 <myren> where does one go about announcing such things?
03:46:09 <kasei> schemaweb?
04:57:28 <_aniasis> _aniasis is now known as aniasis
12:49:16 <chrisc_> chrisc_ is now known as chrisc
14:55:26 <danbri> if anyone cares to play with jabber/rdf, this is as far as I've got using the Smack libraries: http://rdfweb.org/viewcvs/viewcvs.cgi/foafproject/htdocs/2005/code/foaftown/jabber/
14:56:19 <danbri> needs Ant, can be run in client or server mode, but haven't quite got the server to teach the Smack code that it can handle sparql-based IQ requests, nor the client to send the correct form of IQ
14:56:41 <danbri> on the plus side, Smack has a lovely graphical debugger for messages sent and received
14:57:25 <danbri> to play, grab the .java, build.xml, Smack's JARs, and get yourself a couple of test accounts on a public jabber server (jabber-hispano.org worked for me...)
15:01:24 <edsu_> edsu_ is now known as edsu
15:11:22 * danbri puts a holding page at http://www.w3.org/2005/09/xmpp-sparql-binding since a uri for the binding is needed by XMPP/Jabber
15:12:13 <erim> libby, you here?
15:13:05 <crschmidt> danbri: any docs around for what you're doing specifically with jabber?
15:13:08 <crschmidt> I've found jabberpy
15:13:20 <danbri> docs, only the blog entries linked from that last page
15:13:20 <erim> .me wonders what the current thoughts for vocabularies for managing conference events, people, etc. are
15:13:45 <danbri> basically, use the IQ mechanism to transmit RDF queries, and their XML resultset'd response
15:14:10 <danbri> haven't got to details of the binding yet, bogged down in xmpp/jabber details re making touch between endpoints
15:14:46 <danbri> i've got a Listener that hears textual messages; but when I send an IQ packet instead (the preferred way to send a query), something in the Smack library sends back a 'can't handle that' msg
15:14:51 <danbri> even though i thought i'd registered a handler
15:15:26 <danbri> when that basic step is behind us, can figure out how the details of the SPARQL protocol would make sense in terms of XMPP iq
15:15:36 <danbri> <iq id="8NGrm-5" to="foaf@jabber-hispano.org/sparqlclient" from="foaf2@jabber-hispano.org/sparqlserver" type="error">
15:15:38 <danbri> <error code="501">feature-not-implemented</error>
15:15:40 <danbri> </iq>
15:16:08 <danbri> there's also a piece of work todo on endpoint feature discovery
15:16:35 <danbri> currently am hardcoding resource IDs /sparqlclient and /sparqlserver, should instead get those from inspecting the roster to see if an rdf-capable endpoint is attached
15:17:21 * libby waves
15:17:25 <crschmidt> currently have my client connected as <crschmidt@jabber-hispano.org/sparql>
15:17:30 <crschmidt> no work done on anything yet
15:17:41 <crschmidt> just the standard jabberpy "test_client.py"
15:17:43 <danbri> I had difficulty earlier with getting a list of presences from the roster
15:18:10 <danbri> If you can bear Java, the Smack graphical debug window really helps demystify
15:18:15 * crschmidt can't :)
15:18:19 <danbri> :)
15:18:28 <crschmidt> the jabberpy stuff seems pretty simple
15:18:35 <crschmidt> was really just wondering what happens if you send a query my way
15:19:08 <danbri> I can try
15:20:20 * crschmidt attempst to subscribe to foaf@'s presence
15:20:21 <crschmidt> [[[
15:20:21 <crschmidt> DEBUG: sent <presence to='foaf@jabber-hispano.org' type='subscribe' />
15:20:21 <crschmidt> DEBUG: got data <iq xmlns='jabber:client' to='crschmidt@jabber-hispano.org/sparql' type='set'><query xmlns='jabber:iq:roster'><item ask='subscribe' subscription='none' jid='foaf@jabber-hispano.org'/></query></iq>
15:20:21 <dc_swig> Label DEBUG not found.
15:20:22 <dc_swig> Label DEBUG not found.
15:20:26 <crschmidt> Tue Sep 6 11:17:40 2005 - RECV: - <iq xmlns='jabber:client' to='crschmidt@jabber-hispano.org/sparql' type='set'><query xmlns='jabber:iq:roster'><item ask='subscribe' subscription='none' jid='foaf@jabber-hispano.org'/></query></iq>
15:20:30 <crschmidt> ]]]
15:20:46 <danbri> I accepted the adition (via gaim)
15:20:49 <danbri> can you do foaf2 while at it?
15:24:45 <danbri> [java] Initiating connection, role is: [client].
15:24:47 <danbri> [java] Connection roster of client foaf@jabber-hispano.org is: org.jivesoftware.smack.Roster@1a99347
15:24:48 <danbri> [java] Roster item: crschmidt@jabber-hispano.org [foafs list of bots]
15:24:49 <danbri> [java] Roster item: foaf2: foaf2@jabber-hispano.org [foafs list of bots]
15:24:51 <danbri> [java] Server crschmidt@jabber-hispano.org has no presences visible to foaf@jabber-hispano.org
15:25:25 <crschmidt> did foaf2 get crschmidt's subscribe request?
15:25:55 <danbri> wasn't logged in as foaf2 sorry, checking
15:26:25 <danbri> done
15:27:36 <danbri> foaf@ sent this, <iq id="Dh051-5" to="crschmidt@jabber-hispano.org/sparql" type="get">SELECT BLAH BLAH BLAH FROM BLAH</iq>
15:27:41 <crschmidt> hm
15:27:46 * crschmidt scrolls back through
15:27:53 <crschmidt> (example_client output with debug is verbose)
15:28:06 <danbri> i think it should have used a <query xmlns="http://bindinguri/..."/> subelement, with sparql payload
15:28:36 <crschmidt> Tue Sep 6 11:22:14 2005 - RECV: - <presence xmlns='jabber:client' to='crschmidt@jabber-hispano.org/sparql' from='foaf@jabber-hispano.org/sparqlclient' id='bvcO1-3'/><message xmlns='jabber:client' from='foaf@jabber-hispano.org/sparqlclient' type='chat' to='crschmidt@jabber-hispano.org' id='bvcO1-4'><body>Howdy from foaf atjabber-hispano.org</body><thread>Akem90</thread></message><iq xmlns='jabber:client' from='foaf@jabber-hispano.org/sparqlclient'
15:29:27 <danbri> so chat messages get through, and we _could_ just stuff SPARQL in those, but it'd be monsteriously tasteless to do so
15:29:37 <danbri> IQ seems harder to get right, but worth it
15:29:58 * crschmidt nods
15:30:05 <crschmidt> The iq did come through there
15:30:19 <crschmidt> it just came attached to the <presence> and <message>, it looks like
15:30:27 <myren> What do you guys use to test IQ's? none of the clients i've seen expose their clients to IQ's
15:30:29 <danbri> the client didn't see a response
15:30:49 <myren> I should make an XMPP client for developers...
15:30:53 <danbri> we're using software libraries not GUI client apps (although Smack has basic GUI)
15:30:57 <crschmidt> DEBUG: DEPTH -> 2 , tag -> jabber:client iq, attrs -> {u'type': u'get', u'from': u'foaf@jabber-hispano.org/sparqlclient', u'id': u'bvcO1-5', u'to': u'crschmidt@jabber-hispano.org/sparql'}
15:30:57 <dc_swig> Label DEBUG not found.
15:31:01 <crschmidt> DEBUG: data-> SELECT BLAH BLAH BLAH FROM BLAH
15:31:01 <dc_swig> Label DEBUG not found.
15:31:23 <danbri> ok, that's promising
15:31:25 <crschmidt> danbri: not sure what exactly I'm supposed to be looking at or expecting, to be honest, all just guesswork
15:31:30 <danbri> same here ;)
15:31:33 <crschmidt> DEBUG: dispatch called for: name->iq ns->
15:31:33 <dc_swig> Label DEBUG not found.
15:31:42 <crschmidt> it looks like it did call a dispatch for that iq
15:31:46 <crschmidt> but no namespace attached?
15:32:06 <danbri> yeah, doesn't seem to be making the full thing
15:32:12 <crschmidt> anyway, i'd assume since it called a dispatch, I could attach something to listen to that
15:32:32 <crschmidt> but not sure how I'd issue a response yet :)
15:33:12 <danbri> class SPARQLIQ extends IQ {
15:33:14 <danbri> public String getChildElementXML() {
15:33:15 <danbri> return "SELECT BLAH BLAH BLAH FROM BLAH"; // todo :)
15:33:17 <danbri> }
15:33:18 <danbri> }
15:33:41 <danbri> I guess that function has to make the <query > element by hand... the namespace regsitration thing i made was for the receiving handler only i suppose
15:33:56 <danbri> I'll update that to look more like stpeter's xml and see how it smells
15:34:22 <danbri> issue a response... would be great if you figure that out!
15:34:38 <danbri> i've a hope that if i can send the right shape IQ, my listener code might handle it
15:35:44 <crschmidt> can you send that IQ again?
15:37:39 <danbri> 2 mins
15:40:08 <danbri> <iq id="73y71-5" to="crschmidt@jabber-hispano.org/sparql" type="get">
15:40:10 <danbri> <query xmlns="http://www.w3.org/2005/09/xmpp-sparql-binding"> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?jabberID, ?name WHERE { ?x rdf:type foaf:Person . ?x foaf:jabberID ?jabberID . ?x foaf:name ?name }
15:40:11 <danbri> </query>
15:40:13 <danbri> </iq>
15:40:16 <danbri> that's more like it
15:40:31 <crschmidt> woot
15:40:47 <crschmidt> The handler now is taking that data in
15:40:54 <danbri> whee
15:40:58 <crschmidt> so I have a variable with:
15:40:59 <crschmidt> <iq from='foaf@jabber-hispano.org/sparqlclient' type='get' id='73y71-5' to='crschmidt@jabber-hispano.org/sparql'>
15:41:02 <crschmidt> <query xmlns = 'http://www.w3.org/2005/09/xmpp-sparql-binding' > PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?jabberID, ?name WHERE { ?x rdf:type foaf:Person . ?x foaf:jabberID ?jabberID . ?x foaf:name ?name }
15:41:07 <crschmidt> </query></iq>
15:41:13 <crschmidt> not the cleanest thing yet, but i'm sure i can move on from there using some of the other functinos
15:41:21 <danbri> hurrah
15:41:29 <crschmidt> hm, would be nice if we could get an xmlns on the iq though, so i could listen for it specifically
15:41:34 <crschmidt> not sure if i 'm mixing up terms or something though
15:41:45 <danbri> no, the subelement i think is the right way
15:41:48 <danbri> i asked mr jabber
15:41:58 <danbri> well, unless i misunderstood!
15:42:06 <crschmidt> hm
15:42:26 <crschmidt> well, the registerHandler function has: def registerHandler(self,name,handler,type='',ns='',chained=False, makefirst=False, system=False):
15:42:34 <danbri> He suggested: <query xmlns='http://www.w3.org/2005/09/xmpp-sparql-binding'>
15:42:47 <danbri> I wasn't sure if 'query' was an invention of our little protocol, or a convention within Jabber
15:42:59 <danbri> I think more now the former, and hence we should base names on the DAWG protocol spec
15:43:16 <crschmidt> ah, nevermind
15:43:17 <crschmidt> right you are
15:43:19 <crschmidt> DEBUG: dispatch called for: name->iq ns->http://www.w3.org/2005/09/xmpp-sparql-binding
15:43:19 <dc_swig> Label DEBUG not found.
15:43:20 <danbri> which usese that name anyway
15:43:29 <danbri> see http://www.w3.org/TR/rdf-sparql-protocol/#ap
15:43:33 <crschmidt> so, i can register a protocol just for that NS
15:43:54 <danbri> It contains one operation, query, which is used to convey a SPARQL query -- including a SPARQL query string and an RDF dataset -- and a query result between clients (requesters) and services (responders).
15:44:10 <danbri> hmm how to pass in the dataset too? we might need to make subelements? if <iq> allows those
15:44:19 <danbri> guess we'll need subelements for results anyhow
15:44:35 * crschmidt changes client to only listen to iq in that ns
15:45:28 <crschmidt> danbri: can you send one more, just as a check?
15:45:29 <danbri> For now, I think use a single argument
15:45:55 <crschmidt> hm
15:46:05 <crschmidt> seems that the general iq Handler grabbed it too
15:46:19 <crschmidt> so I'll have to make sure not to put anything important in that handler, it handles any namespace, not just the null ns
15:46:45 <danbri> that was from my winxp laptop, but i think its ok. i see an outgoing query with the correct ns and subelement
15:50:59 * crschmidt moves entire setup to athena so he can test against julie's redland db
15:53:52 <crschmidt> okay, danbri, if you send another query, it should actually execute it and spit the results out on my local screen
15:53:56 <crschmidt> so if you want to try that, that'd be cool
15:54:16 <crschmidt> SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. } is a good sample query
15:54:19 <crschmidt> if you can alter them
15:55:12 <danbri> can you be "/sparqlserver' instead of /sparql, when being a queryable thing?
15:55:23 <crschmidt> i can be whatever i need to be
15:55:26 <danbri> thx
15:55:29 <crschmidt> it's just provided on command line
15:55:44 * danbri trying to make my code more customisable, but at moment am flipping between targetting yours and mine
15:56:20 <crschmidt> heh
15:59:20 <danbri> 1 min
16:01:43 <crschmidt> danbri: no query with that last message
16:02:03 <danbri> <iq id="BL4n8-5" to="crschmidt@jabber-hispano.org/sparqlserver" type="get"><query xmlns='http://www.w3.org/2005/09/xmpp-sparql-binding'>SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. }
16:02:04 <danbri> </query>
16:02:09 <danbri> maybe & < horkage
16:02:11 <crschmidt> hm
16:02:18 <crschmidt> send it once more?
16:02:41 <danbri> that's better
16:02:59 <danbri> <iq id="Q0kSr-5" to="crschmidt@jabber-hispano.org/sparqlserver" type="get">
16:03:01 <danbri> <query xmlns="http://www.w3.org/2005/09/xmpp-sparql-binding">SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. }
16:03:02 <danbri> </query>
16:03:04 <danbri> </iq>
16:04:27 <crschmidt> hm, yep, horked my client somehow
16:05:16 * crschmidt maybe fixes
16:05:45 * crschmidt goes to make lunch for four year old, feel free to resend
16:06:46 <danbri> resent
16:07:36 <ndw> Resend the lunch to your four year old?
16:07:38 * ndw grins
16:07:45 <danbri> :)
16:08:01 <crschmidt> ah, okay
16:08:05 <crschmidt> missed a module i need
16:08:48 <crschmidt> danbri: alright, last shot?
16:09:26 <danbri> my server says [java] parseIQ called - Parsing out some sparql...
16:09:32 <danbri> this is good :)
16:09:38 <danbri> ok rerunning it at yours
16:10:19 <crschmidt> hm, redland error
16:10:20 <crschmidt> Error: argument number 4: a 'char *' is expected, 'unicode(SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. } )' is received, Query: SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. }
16:10:39 <danbri2> is there a space before the final .
16:10:43 * danbri2 waves from laptop
16:10:49 <crschmidt> either way
16:11:10 <danbri2> we've reduced it to a sane problem anyway :)
16:11:56 * crschmidt attempts fix, restarts client
16:14:09 <danbri> public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) {}
16:14:20 <danbri> ...seems to be getting called when the query hits my server
16:16:53 <crschmidt> okay, if you send a query again now, looks like it *might* try to send back an XML version of the response in a message
16:17:32 <danbri2> no sign of a response
16:17:47 <crschmidt> meh
16:18:04 <crschmidt> not your fault
16:19:00 <danbri2> let me know when to retry. am getting my head around xml pull parser api
16:19:08 <danbri2> then i try plug in jena at this end
16:19:22 <crschmidt> can retry
16:19:22 <danbri2> and expose my itunes mp3 stash (metadata only :)
16:19:52 <crschmidt> meh
16:19:55 <crschmidt> still getting a weird error
16:20:14 <crschmidt> Error: argument number 4: a 'char *' is expected, 'unicode(SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. }
16:20:17 <crschmidt> )' is received, Query: SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b.
16:20:24 <danbri2> does it work locally? jabber aside?
16:23:42 <crschmidt> yeah
16:24:03 <danbri> [java] parseIQ called - Parsing out some sparql...
16:24:04 <danbri> [java] Start tag query
16:24:06 <danbri> [java] Text SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. }
16:24:07 <danbri> [java] End tag query
16:24:09 <danbri> [java] Text
16:24:10 <danbri> [java] End tag iq
16:24:25 <danbri> OK my server can listen for queries, more or less...
16:25:14 <danbri> reckon you can send them too, once you've fixed this current problem?
16:25:26 <crschmidt> don't know how to send iq
16:25:37 <crschmidt> (and already spent too many cycles today :/ got paying work need to get done)
16:25:46 <crschmidt> last shot at server is in place if you want to give it a shot
16:26:23 <danbri> retrying
16:26:39 <danbri> hmm my server IQ handler code is getting all the presence events too, that wasn't intended
16:27:04 <crschmidt> yeah, must be an underlying redland something or other
16:27:45 <danbri> thanks for giving it a go, we're getting there
16:27:47 <crschmidt> would guess it's dying for some reason on self._query = Redland.librdf_new_query(_world._world, query_language, ruri, querystring, rbase_uri)
16:27:59 <crschmidt> so for some reason, querystring is not a char *
16:28:51 * crschmidt tries to use a str() aroudn the querystring, just in case that helps
16:32:03 <danbri2> retry?
16:32:20 <crschmidt> sure
16:32:23 <crschmidt> hey!
16:32:24 <crschmidt> that worked!
16:33:10 <danbri2> whee :)
16:33:19 <crschmidt> fixed XML bug
16:33:20 <crschmidt> try again?
16:34:02 <danbri2> how was that?
16:34:14 <crschmidt> hm
16:34:33 <crschmidt> okay, fixed again
16:35:32 <crschmidt> got a response?
16:35:40 <danbri2> my server instance saw a presence event when the query client came online to send its message your way
16:35:59 <danbri2> ah i see the reply
16:36:02 <danbri2> sent as a chat message
16:36:06 <crschmidt> yep
16:36:09 <crschmidt> haven't done anything else yet
16:36:14 <crschmidt> sending messages easy
16:36:20 <crschmidt> sending iqs - well, maybe not any harder, but different :)
16:36:23 <danbri2> entity escaped markup, with no results
16:36:29 <danbri2> IQs, exactly
16:36:29 <crschmidt> yeah
16:36:36 <danbri2> cool
16:36:37 <crschmidt> not sure why there was no results
16:36:59 <danbri2> so, with a bit more fiddling, we can all expose little rdf databases to everyone on our buddylist
16:37:07 <danbri2> there must be some use for such a thing!
16:37:33 <crschmidt> oh, i see it
16:37:51 <danbri2> the other thing apart from sending as an IQ, is that you should send it as a response to that message, so that the IDs tie them together
16:37:55 <danbri2> I think
16:38:23 * crschmidt nods
16:38:34 <crschmidt> Alright, you should at least get some result now
16:38:38 <crschmidt> if you try again
16:39:08 <crschmidt> not ideal, not sure why it's only returning that result
16:39:44 <danbri2> &lt;result> etc
16:39:54 <danbri2> &lt;result>
16:39:56 <danbri2> &lt;a uri="http://purl.org/net/inkel/rdf/schemas/lang/1.1#masters"/>
16:39:57 <danbri2> &lt;b>en&lt;/b>
16:39:59 <danbri2> &lt;/result>
16:40:22 <crschmidt> right
16:40:31 <crschmidt> oh, wait, double encoded
16:40:32 <crschmidt> that's goofy
16:40:38 * crschmidt guesses he doesn't need to do the XML on his end
16:40:49 <danbri2> quick, before Norm sees it
16:41:02 * crschmidt updates that
16:41:55 <crschmidt> ^q SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. }
16:42:06 <julie> foaf:icqChatID 47729022, foaf:interest http://www.livejournal.com/interests.bml?int=cell+phones, foaf:mbox_sha1sum bbff51a6d70630daafe242c186a6e27fda3e99c7, foaf:knows http://crschmidt.net/foaf.rdf#rho, foaf:gender neuter, foaf:knows (r1114530965r1209), foaf:knows http://crschmidt.net/~julie/me.rdf#julie, owl:sameAs http://copia.ogbuji.net/files/FOAF/chimezie.rdf#Christopher, foaf:interest http://www.livejournal.com/interests.bml?int=svg, foaf:kn
16:42:06 <julie> ows http://crschmidt.net/foaf.rdf#jpr, tipjar:hasTipjar (r1121976434r4), foaf:mbox mailto:crschmidt@crschmidt.net, foaf:knows http://crschmidt.net/foaf.rdf#loki, foaf:dorkthreshhold 8, foaf:interest http://www.livejournal.com/interests.bml?int=semantic+web, foaf:knows (r1114530965r22814), foaf:knows http://crschmidt.net/foaf.rdf#stace, kiss:kissed http://crschmidt.net/foaf.rdf#jpa, xfn:sweetheart http://crschmidt.net/foaf.rdf#jpa, foaf:name crsch
16:43:15 <crschmidt> ah!
16:43:18 <danbri2> oh crap, i'm in an infinitely long xml document, no wonder i'm not seeing my function return
16:43:19 <crschmidt> figured it out
16:43:32 <crschmidt> okay, you'll get better results now
16:43:38 <crschmidt> wasn't using julie's db
16:44:58 <danbri2> no result yet... is it wedged?
16:46:13 <danbri> meanwhile, when you're debugging i point my laptop client to send to my desktop server instead... which now handles the xml... [java] Extracted query: SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. }
16:46:30 <danbri> ...so i'm in same situation as you, ie could run the query, just ain't clear how to respond
16:47:35 <crschmidt> ah, nope, another broken thing, one sec
16:48:41 <crschmidt> fixed
16:48:52 * crschmidt is not so good at this :)
16:49:42 <crschmidt> there you go, much longer response :)
16:50:15 <danbri2> indeed so
16:50:25 <danbri2> can you do it non-escaped?
16:50:42 * crschmidt shakes his head
16:50:44 <crschmidt> i'm not escaping it
16:50:47 <crschmidt> library is
16:50:50 <danbri2> oh, cos a msg
16:50:52 <danbri2> right
16:50:56 <crschmidt> right
16:51:05 <crschmidt> so when it's not a message anymore, can probably do better
16:53:20 <danbri2> ah, when my server is offline, the query bounces back to client as a 404
16:53:28 <danbri2> but the client lib parses it autoamtically
16:53:49 <danbri2> i'll should make sure i only exec queries when in server mode, potential security hole there!
17:01:10 <crschmidt> query is definitely a Jabber specific thing, not a SPARQL/RDF thing
17:01:29 <danbri2> the choice of element name, within iq, is ours...
17:02:01 <danbri2> to do w3c sparql protocol properly, we'll need a convention for passing in choice of zero or more datasets too (by URI i think)
17:02:11 * danbri2 gets ARQ from CVS
17:02:30 <danbri2> i just committed all of Jena .jars into my cvs for 'convenience', tho could prolly survive on a subset
17:02:57 * danbri2 builds ARQ jar
17:27:12 <danbri2> ok I have it working locally, in that a sparql query comes in, and is executed by my code in server mode
17:27:26 <danbri2> haven't fig'd out how to return the results yet, nor do dataset selection
17:55:48 <valmont_> valmont_ is now known as valmont
18:23:09 <mkflow> hi to all
18:23:24 <danbri> hi
18:24:56 <danbri> logger, pointer?
18:24:56 <danbri> See http://www.ilrt.bris.ac.uk/discovery/chatlogs/swig/2005-09-06#T18-24-56
18:25:48 <dajobe> it points right here
18:28:13 <dmiles_afk> oh hey i been not reading up on advancements in RDF(S) lately but ternary predicates supported?
18:28:34 <dmiles_afk> and what happened with negation and negation by failure?
18:29:47 <mkflow> mkflow is now known as Mkflows
18:30:31 <danbri2> check out the www-rdf-rules list
18:30:44 <danbri2> and the rules workshop list that its been crossposted with lately
18:30:55 <danbri2> there's a charter being designed for a new SW/rdf/etc rules WG
18:31:01 * danbri2 isn't following closes
18:31:03 <crschmidt> Sandro's at the head of that, right?
18:31:05 <danbri2> closely
18:31:05 <dmiles_afk> ah yeah.. on the list .. starting to serhc my emails now
18:31:16 <danbri2> Sandro, yup
18:31:41 * sandro waves, but can't stay right now.
18:32:14 <Wikier> Wikier is now known as WikierOFF
18:32:21 <danbri> stringwriters... outputstreams... java ... :(
18:32:31 * crschmidt chuckles... mwhahaha
18:32:32 <danbri> all i want to do is get XML formatted results from ARQ...
18:32:35 <dmiles_afk> you liking the java language though?
18:32:42 <danbri> its been a while
18:33:36 <danbri> ok, if i can do rfo.outputAsXML(System.err) ; to get my XML on the console... and output writers are byte oriented... yet stringwriters are char oriented... how do i get the markup into a string?
18:33:51 <dmiles_afk> java is adictive it allows you to design stuff very well
18:33:53 <danbri> shouldn't be rocket science but i'm chasing around a web of javadocs and google...
18:34:12 <danbri> i don't want to design stuff well, i want to make a cheesy hack that kinda works, and leave it to the completer-finishers to engineer properly :)
18:34:43 <dmiles_afk> hehe.. yeah it lets you do both
18:35:03 <danbri> I'll go try bribe my housemates w/ cup of tea...
18:35:28 <dmiles_afk> rfo.outputAsXML(System.err)
18:35:38 <dmiles_afk> you want two modes correct?
18:36:03 <dmiles_afk> you can make a new PrintWriter(new StringWriter())
18:36:26 <dmiles_afk> erm oops rdfStr = new StringWriter();
18:36:31 <dmiles_afk> then wrapp it with a print writer
18:36:43 <dmiles_afk> ah but you probly knew that
18:38:15 <dmiles_afk> or PrintStream etc
18:40:07 <dmiles_afk> oh i see .. btye/char .. yeah in 1.5 they trying to make people think about it more.. but still not having to
18:40:09 <crschmidt> danbri: couple questions on jabber-stuff when you get a chance
18:44:18 <crschmidt> jabberpy is great stuff
18:44:20 <crschmidt> [[[
18:44:20 <crschmidt> iq = jabber.Iq(fromName,"get", "http://www.w3.org/2005/09/xmpp-sparql-binding")
18:44:24 <crschmidt> iq.setQueryPayload(result)
18:44:26 <crschmidt> print "IQ: <%s> %s" % (JID, iq.getQueryNode())
18:44:29 <crschmidt> con.send(iq)
18:44:31 <crschmidt> ]]]
18:44:50 <crschmidt> danbri: client should now send an Iq instead of msg as response
18:46:42 <crschmidt> not sure if it's how you're expecting it: sending a type='get', with NS as above, sending full SPARQL XML Query results
18:50:27 <danbri> i'll retry
18:51:36 <danbri2> ok i sent the wrong query
18:51:44 <danbri2> did you see it? no results response here yet
18:52:37 <crschmidt> no, my client is offline
18:52:38 <danbri2> resent correct query
18:52:40 <danbri2> ah
18:52:41 <crschmidt> i'm working on getting sending working
18:52:45 <danbri2> lemme know when
18:52:47 <danbri2> ok
18:52:59 <crschmidt> not sure how to include non-XML content in QueryPayload
18:54:12 <danbri2> such as?
18:54:22 <crschmidt> oh wait, my client did get your query
18:54:28 <crschmidt> hah, that'll take about 15 minutes
18:54:38 <crschmidt> okay, maybe not that long, but too long :)
18:54:53 <danbri2> the 1st query you mean? all jabberIDs and names
18:55:10 <crschmidt> yeah, but you selceted "?x rdf:type foaf:Person" first
18:55:26 <crschmidt> you apparently didn't read my blog post on "Optimizing SPARQL queries" :)
18:55:38 <crschmidt> SELECT ?jabberID ?name WHERE { ?x rdf:type foaf:Person . ?x foaf:jabberID ?jabberID . ?x foaf:name ?name }
18:55:43 <danbri2> i didnt' think order was supposed to matter
18:55:58 <crschmidt> ^q SELECT ?jabberID ?name WHERE { ?x foaf:jabberID ?jabberID . ?x foaf:name ?name. }
18:56:04 <crschmidt> that should be much quicker, but will still take a while
18:56:14 <julie> ressu@ressukka.net Sami Haahtinen, piotr.karwasz@jabber.org Piotr Przemysław Karwasz, dirkx@wirelessleiden.nl Dirk Willem van Gulik, masaka@jabber.org 神崎正英 (x2), sad-hu@Jabber.org Matti Lassila, phil@jabbernet.org Phil Wilson, sebastian.dietzold@imise.uni-leipzig.de Sebastian Dietzold, MattCroydon@jabber.com Matt Croydon, ajmitch@jabber.org Andrew "ajmitch" Mitchell, dirkx@jabber.net Asemantics, thecrypto@jabber.org Julian Krause, seitz@
18:56:14 <julie> jabber.com Bill Seitz, dirkx@jabber.net Dirk-Willem van Gulik, dhrasmus@charente.de Dan Rasmussen, schika@jabber.org Stephan Bock, chris@mkp.ca Chris Forsyth, kingmob@jabber.org Philipp Droessler, danbri@gnu.minu.nu Dan Brickley (x3), zcat@jabber.meta.net.nz Bruce "zcat" Kingsbury, danbri@jabber.org Dan Brickly, emacsen@jabber.org Serge Wroclawski, dirkx@wirelessleiden.nl Asemantics, dirkx@jabber.com Asemantics, freso@jabber.org Frederik 'Freso'
18:56:19 <crschmidt> yeah, that wasn't so bad
18:56:25 <crschmidt> Redland follows triples as they happen
18:57:03 <crschmidt> so first it'll find all the ?x which match rdf:type foaf:Person
18:57:09 <crschmidt> which is a big chunk of the dataset
18:57:10 <danbri2> ^q SELECT ?jabberID ?name WHERE { ?x foaf:jabberID ?jabberID . ?x foaf:name ?name . ?x foaf:mbox <mailto:danbri@w3.org> . }
18:57:20 <julie> danbri@jabber.org Dan Brickly, danbri@gnu.minu.nu Dan Brickly, danbri@gnu.minu.nu Dan Brickley (x2), danbri@jabber.org Dan Brickley (x2)
18:57:29 <danbri2> hmm should've put that last bit first? nah, that's the engine's job
18:58:04 <crschmidt> danbri: You can say that, and wait for the results, or you can just do the engine's job for it, which is the most appropriate given the current optimization strategies for engines
18:58:15 <crschmidt> going to kill the client searching for jabberIDs
18:58:24 <crschmidt> (hm, or try, stuck looping)
18:58:38 <crschmidt> 54% CPU, fun stuff
18:58:47 <danbri2> so new query... who spells my name 'Brickly'? :)
19:00:52 <WikierOFF> WikierOFF is now known as Wikier
19:01:00 <crschmidt> youch
19:01:17 <crschmidt> ^q select ?p where (?p foaf:name "Dan Brickly")
19:01:17 <julie> (r1124565507r7)
19:01:31 <crschmidt> ^q select ?n where (?p foaf:name "Dan Brickly") (?p2 foaf:knows ?p) (?p2 foaf:name ?n)
19:01:32 <julie> Morten Frederiksen@en, Jim, Jim Ley (x2), マカシネビル チャールズ, شارل مككاثينبل, Charles McCathieNeville, crschmidt^^<http://www.w3.org/2001/XMLSchema#string>, شارل مككاثينبل@ar, マカシネビル チャールズ@ja, Morten Frederiksen^^<http://www.w3.org/2001/XMLSchema#string>, Morten Frederiksen, Jim Ley^^<http://www.w3.org/2001/XMLSchema#string>, Morten, Charles McCathieNevile (Chaals), Christopher S
19:01:33 <julie> chmidt, Charles McCathieNevile
19:01:38 <crschmidt> hm
19:01:42 <crschmidt> no way of knowing. No contexts
19:01:48 <danbri2> ah
19:01:56 <crschmidt> alright, danbri, got an endpoint i can send queries at?
19:02:14 <crschmidt> got a client in place and working
19:02:23 <danbri2> try foaf2@
19:02:30 <crschmidt> example query?
19:02:36 <crschmidt> or does it not matter?
19:02:36 <danbri2> it can only query a fixed dataset, http://danbri.org/foaf.rdf
19:02:44 <danbri2> so the jabber query i sent you would work
19:03:19 <crschmidt> aw, fuck
19:03:24 <crschmidt> well, i got back:
19:03:25 <crschmidt> Tue Sep 6 15:03:12 2005 - RECV: - <iq xmlns='jabber:client' from='foaf2@jabber-hispano.org' type='error' to='crschmidt@jabber-hispano.org/sparqlclient'><error type='cancel' code='501'><feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error><query xmlns='http://www.w3.org/2005/09/xmpp-sparql-binding'>SELECT ?a ?b WHERE { ?a ?b ?c. }</query></iq>
19:03:36 <danbri2> i had that woe before
19:03:45 <crschmidt> which my client then caught
19:03:48 <danbri2> maybe i'm offline; that response came from server not my desktop
19:03:50 <crschmidt> and said "ooh, you're asking me a question!"
19:04:01 <danbri2> aha, i had that problem
19:04:04 <crschmidt> so now it's spinning and trying to spit out all of julie's dataset
19:04:05 <danbri2> i thought i was being a doofus w/ the apis
19:04:11 <crschmidt> yeah, remembered you mentioning it
19:04:19 <crschmidt> not sure if it is or not
19:04:34 <danbri2> the query handler is getting called whenever a query-related stanza floats past, and isn't being passed enough app context to know wtf is happening
19:04:40 <crschmidt> looks like errors are still sending the <query> back, so i guess needs to check that iq.firstChild is <query>
19:05:53 <danbri> can you retry?
19:06:10 <crschmidt> one sec
19:06:15 <crschmidt> lemme make it so my client doesn't execute
19:08:29 <crschmidt> DEBUG: sent <iq to='foaf2@jabber-hispano.org/sparqlserver' type='get'><query xmlns = 'http://www.w3.org/2005/09/xmpp-sparql-binding' >SELECT ?a WHERE { ?a ?b ?c. }</query></iq>
19:08:29 <dc_swig> Label DEBUG not found.
19:08:57 <crschmidt> danbri: I think we need to set up a different type for responses (other than "get"): thoughts?
19:10:05 <danbri> see http://www.jivesoftware.org/builds/smack/docs/latest/javadoc/org/jivesoftware/smack/packet/IQ.html
19:10:15 <danbri> Each IQ packet has a specific type that indicates what type of action is being taken: "get", "set", "result", or "error".
19:10:27 <danbri> pretty RESTy
19:10:56 <crschmidt> ah
19:11:08 <crschmidt> ah
19:11:31 <crschmidt> danbri: then should the Iq type for returns be "result"?
19:11:33 <danbri> the way I have to do it is: class SPARQLProvider implements IQProvider
19:11:41 <danbri> "result", yup
19:11:51 * danbri is going to go out on a limb here ;)
19:12:12 <crschmidt> i thinhk i knocked foaf2 sparqlserver offline
19:12:19 <danbri> where 0 results is an error, i guess we check the sparql protocol spec
19:12:38 <crschmidt> DEBUG: sent <iq to='foaf2@jabber-hispano.org/sparqlserver' type='get'><query xmlns = 'http://www.w3.org/2005/09/xmpp-sparql-binding' >SELECT ?jabberID ?name WHERE { ?x foaf:jabberID ?jabberID . ?x foaf:name ?name. }</query></iq>
19:12:38 <dc_swig> Label DEBUG not found.
19:12:41 <crschmidt> DEBUG: got data <presence xmlns='jabber:client' to='crschmidt@jabber-hispano.org/sparqlclient' from='foaf2@jabber-hispano.org/sparqlserver' type='unavailable' id='2SJ96-4'/>
19:12:42 <dc_swig> Label DEBUG not found.
19:12:48 <crschmidt> oh, heh
19:12:50 <crschmidt> no namespaces
19:13:06 <crschmidt> I bet that kicked your sparql query engine in the butt, uncaught exception, boomf, no more foaf2
19:13:27 <danbri> no, it didn't even register here
19:13:59 <crschmidt> hm
19:14:04 <crschmidt> well, something happened there :p
19:14:14 <danbri> [java] parseIQ called - Parsing out some sparql...
19:14:16 <danbri> [java] com.hp.hpl.jena.query.parser.QNameException: Line 1, column 35: Unresolved qname: foaf:jabberID
19:14:18 <danbri> [java] at com.hp.hpl.jena.query.parser.ParserBase.fixupQName(ParserBase.java:209)
19:14:19 <danbri> so it did
19:14:24 <crschmidt> hah, i totally win
19:14:36 <danbri> retry?
19:14:54 <crschmidt> sent another query your way
19:15:25 <crschmidt> no response from you though
19:15:39 <danbri> [java] <results ordered="false" distinct="false">
19:15:41 <danbri> [java] <result>
19:15:42 <danbri> [java] <binding name="jabberID">
19:15:44 <danbri> [java] <literal xml:lang="en">danbri@jabber.org</literal>
19:15:45 <danbri> [java] </binding>
19:15:47 <danbri> [java] <binding name="name">
19:15:48 <danbri> [java] <literal xml:lang="en">Dan Brickley</literal>
19:15:50 <danbri> [java] </binding>
19:15:51 <danbri> [java] </result>
19:15:53 <danbri> [java] </results>
19:16:16 <danbri> went to System.err here, thanks (shellac investigated...) to AndyS having removed the Writer facility from ARQ's output formatter
19:16:25 <crschmidt> ah
19:16:27 <danbri> will make a version with it in... and ask andy
19:16:40 <crschmidt> bah: Error: 'ascii' codec can't encode character u'\xf6' in position 464: ordinal not in range(128), Query: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?jabberID ?name WHERE { ?x foaf:jabberID ?jabberID . ?x foaf:name ?name. }
19:16:44 <danbri> however yr query didn't, for some reason, register in the Smack gui debug
19:16:54 <crschmidt> danbri: no <message> component
19:17:01 <crschmidt> Maybe?
19:17:10 <danbri> normally i see a log of all packets, by type
19:17:14 <danbri> as well as raw received packets
19:17:15 <crschmidt> Your Iq packets always include a <message> and <presence> packet too
19:17:15 <crschmidt> ah
19:17:18 <danbri> it shows in the latter
19:18:36 <danbri> ok, i tried my client
19:18:41 <danbri> lets find out the difference...
19:19:45 <danbri> mine: <iq xmlns='jabber:client' from='foaf@jabber-hispano.org/sparqlclient' type='get' to='foaf2@jabber-hispano.org/sparqlserver' id='puPEE-5'><query xmlns='http://www.w3.org/2005/09/xmpp-sparql-binding'>SELECT ?a ?b WHERE { <http://crschmidt.net/foaf.rdf#crschmidt> ?a ?b. } </query>
19:19:58 <danbri> yours: <query xmlns='http://www.w3.org/2005/09/xmpp-sparql-binding'>PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?jabberID ?name WHERE { ?x foaf:jabberID ?jabberID . ?x foaf:name ?name. }</query></iq>
19:20:07 <danbri> can you set an id= automagically?
19:20:19 <danbri> it'll all mine (in theory) to send a responce that you could filter against
19:20:40 <danbri> ie. you should have some facility roughly like this:
19:20:42 <danbri> PacketCollector collector = con.createPacketCollector(
19:20:44 <danbri> new PacketIDFilter(sparqlRequest.getPacketID()));
19:20:45 <danbri> con.sendPacket(sparqlRequest);
19:21:15 <danbri> ...where sparqlRequest was my outgoing message, and I'm interested in filtering responses to it from the broader stream of xml stanzas coming my way
19:21:46 <crschmidt> i think my <iq> doesn't have an xmlns on it
19:22:35 <danbri> <iq xmlns='jabber:client' from='crschmidt@jabber-hispano.org/sparqlclient' type='get' to='foaf2@jabber-hispano.org/sparqlserver'>
19:22:42 <danbri> it does, sorry didn't copy that bit
19:22:52 <danbri> its the id=
19:22:59 <crschmidt> okay
19:23:03 <crschmidt> so I need to set an id...
19:23:19 <danbri> thats the ony difference i can see, explaining why it doesn't show up in the main pane of Smack debug
19:23:27 <danbri> and i know that that means the app won't be able to respond to it
19:31:54 <crschmidt> Tue Sep 6 15:31:33 2005 - SENT: - <iq to='foaf2@jabber-hispano.org/sparqlserver' type='get' id='5'><query xmlns = 'http://www.w3.org/2005/09/xmpp-sparql-binding' >PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?jabberID ?name WHERE { ?x foaf:jabberID ?jabberID . ?x foaf:name ?name. }</query></iq>
19:32:35 <danbri> did you choose the value of id ?
19:33:00 * danbri wondering whether it has to match some production like letters-then-numbers
19:33:09 <crschmidt> nope
19:33:14 <crschmidt> con.getAnID
19:33:21 <danbri> <iq id="4" to="foaf2@jabber-hispano.org/sparqlserver" from="crschmidt@jabber-hispano.org/sparqlclient" type="get">
19:33:23 <danbri> <query xmlns="http://www.w3.org/2005/09/xmpp-sparql-binding"> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?jabberID, ?name WHERE { ?x rdf:type foaf:Person . ?x foaf:jabberID ?jabberID . ?x foaf:name ?name }
19:33:24 <danbri>
19:33:26 <danbri> </query>
19:33:27 <danbri> that arrived
19:33:38 <Wikier> Wikier is now known as WikierOFF
19:33:38 <danbri> hey, that explains why two queries appeared in my console when i sent only 1, doh :)
19:33:53 <crschmidt> heh, heh
19:34:03 <crschmidt> still not getting a response: should I be?
19:34:45 <danbri> no, i've not figured out how to
19:36:46 <crschmidt> okay
19:36:56 <danbri> getting there
19:39:45 <crschmidt> alright, so i have something that acts as both client and server
19:39:51 <crschmidt> and you have something that acts as client, right?
19:40:12 <danbri> yup, and a listens-but-won't-answer server
19:40:20 <crschmidt> heh, heh
19:40:29 <crschmidt> i had one of those hours ago! yet again, python wins over java
19:40:55 * danbri ponders, decides he's happy to blame the tools on this occasion
19:41:09 <danbri> though Smack seems pretty solid
19:41:18 <danbri> i'm just rusty
19:41:59 * crschmidt nods
19:42:14 * danbri re-reads http://www.jivesoftware.org/builds/smack/docs/latest/documentation/providers.html
19:42:19 <crschmidt> I think the fact that in 2 hours of sit-down time, I've hacked it together is still pretty impressive
19:43:02 <danbri> OK i guess i'm trying to do too much inside the IQ provider code
19:44:48 <crschmidt> i'm still not sure how to set a namespace on the <iq>
19:44:51 <crschmidt> not sure if it's required or not
19:45:13 <danbri2> you don't need to
19:45:20 <danbri2> see above, i think yours and mine are same now
19:45:42 <crschmidt> assuming you don't need that, yes
19:45:51 <danbri2> i've figured out what to do... in SPARQLProvider *all* I have to do is generate a SPARQLIQ java object that encapsulates the sparql query
19:45:58 <danbri2> then I re-capture it again with a listener
19:46:05 <danbri2> that'll give me the context i need to respond
19:59:15 * danbri wonders Java's preferred way of escaping text for XML emissions
20:38:24 <WikierOFF> WikierOFF is now known as Wikier
21:29:44 <raxor> raxor is now known as raxor|away
21:48:27 <danbri> [java] Server got a packet of interest: <iq id="BGvDg-5" to="foaf2@crschmidt.net/sparqlserver" from="foaf@crschmidt.net/sparqlclient" type="get">
21:48:29 <danbri> [java] <query xmlns='http://www.w3.org/2005/09/xmpp-sparql-binding'>
21:48:31 <danbri> [java] PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?jabberID, ?name WHERE { ?x rdf:type foaf:Person . ?x foaf:jabberID ?jabberID . ?x foaf:name ?name } [java]
21:48:33 <danbri> [java] </query>
21:48:33 <danbri> [java] </iq>
21:48:45 <danbri> OK fixed all the weirdness, got a custom packet listener wired up, it's all looking good
21:49:14 <danbri> -> http://rdfweb.org/viewcvs/viewcvs.cgi/foafproject/htdocs/2005/code/foaftown/jabber/
21:49:35 * danbri notices the clock's wrong on the webserver, great...
21:51:26 * crschmidt attempts to query against foaf2, fails?
21:51:37 <danbri> its mostly offline
21:51:45 <danbri> just trying to rewire jena in
22:45:41 <raxor|away> raxor|away is now known as raxor
The IRC chat here was automatically logged without editing and contains content written by the chat participants identified by their IRC nick. No other identity is recorded.
Alternate versions:
and
Text
Provided by Dave Beckett. Hosted by Useful Information Company.