<br><br><div class="gmail_quote">On Fri, Mar 18, 2011 at 8:39 AM, peter williams <span dir="ltr">&lt;<a href="mailto:home_pw@msn.com">home_pw@msn.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Thanks. And, you confirmed my worst fear – that each source of foaf documents (n billion of them, in the endgame) could require a different sparql query, merely to test if an array has a particular value. That world is obviously impractical.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">For now (since we all learning), for any foaf card I will make upto 2 queries, in sequence.  If either of the queries you outline generates a webid value in its result-type, then the cert is valid. This is a coping strategy, not a fix. But, at least the 2 highest-profile foaf generating sites with webid pubkeys will be queryable.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Is there a way to run the “2 queries”  in just one run of the sparql protocol? Use a composite query that is?</span></p>
</div></div></blockquote><div><br></div><div>yes, you can combine 2 graph patterns with UNION [1]</div><div><br></div><div>Steph.</div><div><br></div><div>[1] <a href="http://www.w3.org/TR/rdf-sparql-query/#alternatives">http://www.w3.org/TR/rdf-sparql-query/#alternatives</a></div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;color:windowtext">From:</span></b><span style="font-size:10.0pt;color:windowtext"> <a href="mailto:foaf-protocols-bounces@lists.foaf-project.org" target="_blank">foaf-protocols-bounces@lists.foaf-project.org</a> [mailto:<a href="mailto:foaf-protocols-bounces@lists.foaf-project.org" target="_blank">foaf-protocols-bounces@lists.foaf-project.org</a>] <b>On Behalf Of </b>Andreas Radinger<br>
<b>Sent:</b> Friday, March 18, 2011 4:57 AM<br><b>To:</b> <a href="mailto:foaf-protocols@lists.foaf-project.org" target="_blank">foaf-protocols@lists.foaf-project.org</a><br><b>Subject:</b> Re: [foaf-protocols] webid query at uriburner targeting a <a href="http://foaf.me" target="_blank">foaf.me</a> card</span></p>
</div></div><div><div></div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal">On 3/18/11 12:12 AM, Peter Williams wrote: </p><p class="MsoNormal"><span>using the uriburner query:</span><br><span> </span></p><p class="MsoNormal" style="margin-bottom:12.0pt">
<span>DEFINE get:soft &quot;replace&quot;<br>PREFIX cert: &lt;</span><a href="http://www.w3.org/ns/auth/cert" target="_blank"><span style="color:black">http://www.w3.org/ns/auth/cert</span></a><span>#&gt; <br>PREFIX rsa: &lt;</span><a href="http://www.w3.org/ns/auth/rsa" target="_blank"><span style="color:black">http://www.w3.org/ns/auth/rsa</span></a><span>#&gt; <br>
select  ?webid <br>FROM &lt;</span><a href="http://foaf.me/pw2#me" target="_blank"><span style="color:black">http://foaf.me/pw2#me</span></a><span>&gt;<br>WHERE {<br>[] cert:identity ?webid ;<br>rsa:modulus ?m ;<br>rsa:public_exponent ?e .<br>
?m cert:hex &quot;BD4B4A4435D501EE874670E1017FABB08060C1CB3CE5B43D7F627CC4E0A21D243A4FD6890BCF723F39CA5F0A866E43400699146F47F699033C07C8E7CFB9066E851B5D8D2E7179A0DB2C1A59B7FC7CBE70AAB9D0D3A7F234DB9FCEF967AB8FB7932897C12CB074EDE215FECA0DF407F72336064E81D43F8301A994E2A0F4BACD&quot;^^xsd:string .<br>
?e cert:decimal &quot;65537&quot;^^xsd:string<br>}</span></p><div><p class="MsoNormal"><span> </span></p></div><div><p class="MsoNormal"><span>the <a href="http://foaf.me" target="_blank">foaf.me</a> card at </span><a href="http://foaf.me/pw2#me" target="_blank"><span style="color:black">http://foaf.me/pw2#me</span></a><span> has</span></p>
</div><div><p class="MsoNormal"><span> </span></p></div><div><div><blockquote style="margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt"><div style="margin-left:12.0pt"><p class="MsoNormal"><a href="http://foaf.me/pw2" target="_blank"><strong><span style="color:black">-</span></strong></a><span> <span>&lt;</span><span>rdf:Description</span><span>&gt;</span></span></p>
</div><div><div style="margin-left:12.0pt"><p class="MsoNormal"><strong><span> </span></strong><span> <span>&lt;</span><span>rdf:type</span> <span>rdf:resource</span><span>=&quot;</span><b><a href="http://www.w3.org/ns/auth/rsa#RSAPublicKey" target="_blank">http://www.w3.org/ns/auth/rsa#RSAPublicKey</a></b><span>&quot; /&gt;</span> </span></p>
</div></div><div><div style="margin-left:12.0pt"><p class="MsoNormal"><strong><span> </span></strong><span> <span>&lt;</span><span>cert:identity</span> <span>rdf:resource</span><span>=&quot;</span><b>#me</b><span>&quot; /&gt;</span> </span></p>
</div></div><div><div style="margin-left:12.0pt"><p class="MsoNormal"><a href="http://foaf.me/pw2" target="_blank"><strong><span style="color:black">-</span></strong></a><span> <span>&lt;</span><span>rsa:modulus rdf:parseType</span><span>=&quot;</span><b>Resource</b><span>&quot;&gt;</span></span></p>
</div><div><div><div style="margin-left:12.0pt"><p class="MsoNormal"><strong><span> </span></strong><span> <span>&lt;</span><span>cert:hex</span><span>&gt;</span><strong><span>bd 4b 4a 44 35 d5 01 ee 87 46 70 e1 01 7f ab b0 80 60 c1 cb 3c e5 b4 3d 7f 62 7c c4 e0 a2 1d 24 3a 4f d6 89 0b cf 72 3f 39 ca 5f 0a 86 6e 43 40 06 99 14 6f 47 f6 99 03 3c 07 c8 e7 cf b9 06 6e 85 1b 5d 8d 2e 71 79 a0 db 2c 1a 59 b7 fc 7c be 70 aa b9 d0 d3 a7 f2 34 db 9f ce f9 67 ab 8f b7 93 28 97 c1 2c b0 74 ed e2 15 fe ca 0d f4 07 f7 23 36 06 4e 81 d4 3f 83 01 a9 94 e2 a0 f4 ba cd</span></strong><span>&lt;/</span><span>cert:hex</span><span>&gt;</span> </span></p>
</div></div><div><p class="MsoNormal"><strong><span> </span></strong><span> <span>&lt;/</span><span>rsa:modulus</span><span>&gt;</span></span></p></div></div></div><div><div style="margin-left:12.0pt"><p class="MsoNormal">
<a href="http://foaf.me/pw2" target="_blank"><strong><span style="color:black">-</span></strong></a><span> <span>&lt;</span><span>rsa:public_exponent rdf:parseType</span><span>=&quot;</span><b>Resource</b><span>&quot;&gt;</span></span></p>
</div><div><div><div style="margin-left:12.0pt"><p class="MsoNormal"><strong><span> </span></strong><span> <span>&lt;</span><span>cert:decimal</span><span>&gt;</span><strong><span>65537</span></strong><span>&lt;/</span><span>cert:decimal</span><span>&gt;</span> </span></p>
</div></div><div><p class="MsoNormal"><strong><span> </span></strong><span> <span>&lt;/</span><span>rsa:public_exponent</span><span>&gt;</span></span></p></div></div></div><div><p class="MsoNormal"><strong><span> </span></strong><span> <span>&lt;/</span><span>rdf:Description</span><span>&gt;</span></span></p>
</div></blockquote><div><p class="MsoNormal"><span> </span></p></div><div><p class="MsoNormal"><span> </span></p></div><div><p class="MsoNormal"><span><span>what I&#39;m hoping is that the uriburner agent will, given the 1 query formula (into which I plugin mod/exp/uri from the client cert), talk to both the webid wiki resource server and the <a href="http://foaf.me" target="_blank">foaf.me</a> resource server.</span></span></p>
</div><div><p class="MsoNormal"><span> </span></p></div><div><p class="MsoNormal"><span><span>Logically, there is no difference in the triple sets (apart from values) - though the wiki is using HTML/RDFa and <a href="http://foaf.me" target="_blank">foaf.me</a> returns RDF/XML. Do I have to know to put the hex in lower case, or something?</span></span></p>
</div><div><p class="MsoNormal"><span> </span></p></div><div><blockquote style="margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt"><p class="MsoNormal"><span lang="EN">HTTP/1.1 200 OK</span><span lang="EN"><br></span><span lang="EN">Date: Thu, 17 Mar 2011 22:53:54 GMT</span><span lang="EN"><br>
</span><span lang="EN">Server: Apache/2.2.12 (Ubuntu)</span><span lang="EN"><br></span><span lang="EN">X-Powered-By: PHP/5.2.10-2ubuntu6.4</span><span lang="EN"><br></span><span lang="EN">MS-Author-Via: SPARQL</span><span lang="EN"><br>
</span><span lang="EN">Content-Length: 1381</span><span lang="EN"><br></span><span lang="EN">Keep-Alive: timeout=15, max=100</span><span lang="EN"><br></span><span lang="EN">Connection: Keep-Alive</span><span lang="EN"><br>
</span><span lang="EN">Content-Type: application/xml</span><span lang="EN"><br></span><span lang="EN">X-Pad: avoid browser bug</span><span lang="EN"><br></span><span lang="EN"> </span><span lang="EN"><br></span><span lang="EN">&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;</span><span lang="EN"></span></p>
</blockquote><p class="MsoNormal"><span><span lang="EN">&lt;rdf:RDF xmlns:rdf=</span></span><span><span lang="EN"><a href="http://www.w3.org/1999/02/22-rdf-syntax-ns" target="_blank"><span style="color:black">http://www.w3.org/1999/02/22-rdf-syntax-ns#</span></a></span></span><span lang="EN"><br>
</span><span><span lang="EN">...</span></span><span lang="EN"><br></span><span><span lang="EN"> </span></span><span lang="EN"><br></span><span><span lang="EN">Summary. query get the right answer when working against the webid wiki&#39;s triples, but same basic query doesnt seem to get the right answer against the <a href="http://foaf.me" target="_blank">foaf.me</a> resource.</span></span></p>
</div></div></div><pre> </pre><pre>_______________________________________________</pre><pre>foaf-protocols mailing list</pre><pre><a href="mailto:foaf-protocols@lists.foaf-project.org" target="_blank">foaf-protocols@lists.foaf-project.org</a></pre>
<pre><a href="http://lists.foaf-project.org/mailman/listinfo/foaf-protocols" target="_blank">http://lists.foaf-project.org/mailman/listinfo/foaf-protocols</a></pre><p class="MsoNormal">Hi,<br><br>the problem is that <br>a) the wiki page in RDFa at [1] use typed literals (xsd:string) and <br>
b) the <a href="http://foaf.me" target="_blank">foaf.me</a> resource in RDF at [2] use untyped literals <br>for the values of cert:hex and cert:decimal.<br><br>The correct query for a) is:<br>PREFIX cert: <a href="http://www.w3.org/ns/auth/cert" target="_blank">&lt;http://www.w3.org/ns/auth/cert#&gt;</a><br>
PREFIX rsa: <a href="http://www.w3.org/ns/auth/rsa" target="_blank">&lt;http://www.w3.org/ns/auth/rsa#&gt;</a><br>select  ?webid<br>FROM <a href="http://webid.myxwiki.org/xwiki/bin/view/XWiki/homepw4" target="_blank">&lt;http://webid.myxwiki.org/xwiki/bin/view/XWiki/homepw4&gt;</a><br>
WHERE {<br>[] cert:identity ?webid ;<br>rsa:modulus ?m ;<br>rsa:public_exponent ?e .<br>?m cert:hex &quot;b520f38479f5803a7ab33233155eeef8ad4e1f575b603f7780f3f60ceab1\n34618fbe117539109c015c5f959b497e67c1a3b2c96e5f098bb0bf2a6597\n779d26f55fe8d320de7af0562fd2cd067dbc9d775b22fc06e63422717d00\na6801dedafd7b54a93c3f4e59538475673972e524f4ec2a3667d0e1ac856\nd532e32bf30cef8c1adc41718920568fbe9f793daeeaeeaa7e8367b7228a\n895a6cf94545a6f6286693277a1bc7750425ce6c35d570e89453117b88ce\n24206afd216a705ad08b7c59\n&quot;^^xsd:string .<br>
?e cert:decimal &quot;65537&quot;^^xsd:string .<br>}<br><br>The correct query for b) would be:<br>PREFIX cert: <a href="http://www.w3.org/ns/auth/cert" target="_blank">&lt;http://www.w3.org/ns/auth/cert#&gt;</a><br>PREFIX rsa: <a href="http://www.w3.org/ns/auth/rsa" target="_blank">&lt;http://www.w3.org/ns/auth/rsa#&gt;</a><br>
select  ?webid<br>FROM <a href="http://foaf.me/pw2#me" target="_blank">&lt;http://foaf.me/pw2#me&gt;</a><br>WHERE {<br>[] cert:identity ?webid ;<br>rsa:modulus ?m ;<br>rsa:public_exponent ?e .<br>?m cert:hex &quot;bd 4b 4a 44 35 d5 01 ee 87 46 70 e1 01 7f ab b0 80 60 c1 cb 3c e5 b4 3d 7f 62 7c c4 e0 a2 1d 24 3a 4f d6 89 0b cf 72 3f 39 ca 5f 0a 86 6e 43 40 06 99 14 6f 47 f6 99 03 3c 07 c8 e7 cf b9 06 6e 85 1b 5d 8d 2e 71 79 a0 db 2c 1a 59 b7 fc 7c be 70 aa b9 d0 d3 a7 f2 34 db 9f ce f9 67 ab 8f b7 93 28 97 c1 2c b0 74 ed e2 15 fe ca 0d f4 07 f7 23 36 06 4e 81 d4 3f 83 01 a9 94 e2 a0 f4 ba cd&quot;.<br>
?e cert:decimal &quot;65537&quot;.<br>}<br><br><br>[1] <a href="http://webid.myxwiki.org/xwiki/bin/view/XWiki/homepw4" target="_blank">http://webid.myxwiki.org/xwiki/bin/view/XWiki/homepw4</a><br>[2] <a href="http://foaf.me/pw2" target="_blank">http://foaf.me/pw2</a><br>
<br><br></p><pre>-- </pre><pre>Best regards</pre><pre>Andreas Radinger</pre><pre> </pre><pre> </pre><pre>------------------------------------------</pre><pre>Dipl.-Ing. Andreas Radinger</pre><pre>Professur für Allgemeine BWL, insbesondere E-Business</pre>
<pre>e-business &amp; web science research group</pre><pre>Universität der Bundeswehr München</pre><pre> </pre><pre>e-mail: <a href="mailto:andreas.radinger@unibw.de" target="_blank">andreas.radinger@unibw.de</a></pre><pre>
phone:  <a href="tel:%2B49-%280%2989-6004-4218" target="_blank">+49-(0)89-6004-4218</a></pre><pre>fax:    <a href="tel:%2B49-%280%2989-6004-4620" target="_blank">+49-(0)89-6004-4620</a></pre><pre>www:    <a href="http://www.unibw.de/ebusiness/" target="_blank">http://www.unibw.de/ebusiness/</a></pre>
<pre>skype:  andreas.radinger</pre><pre> </pre></div></div></div></div><br>_______________________________________________<br>
foaf-protocols mailing list<br>
<a href="mailto:foaf-protocols@lists.foaf-project.org">foaf-protocols@lists.foaf-project.org</a><br>
<a href="http://lists.foaf-project.org/mailman/listinfo/foaf-protocols" target="_blank">http://lists.foaf-project.org/mailman/listinfo/foaf-protocols</a><br></blockquote></div><br>