Re: rdfa parsing issue -- was: fixed https://foafssl.org/test/WebId

hi henry,

i changed the meta-inf content-type to application/xhtml+xml as suggested here [1]
the doctype was correct from the beginning.

there is really a lot of confusion concerning rdfa, even with validator.w3.org :
if i open "more options", select "XHTML+RDFa" from the "Document Type" select box
and check "Show Source" and validate, i get a warning stating : "DOCTYPE Override in effect!"
when i scroll down, i see that the DOCTYPE has been replaced by the exact same string, but
it is said that the document will be valid if i made the changes. that could be fixed when
someone finds time for this, because the replacement DOCTYPE is exactly the same as the original DOCTYPE.

anyways : also with application/xhtml+xml the error stays the same : "keys in profile don't match key in certificate for http://2sea.org/sea.jsp#j"

note : there is a high chance that foafssl's parser is doing something with the hexBinary which is done again by your code and so messing up the hexBinary.
i recommend taking a look at the parser alone and log the hexBinary value, first the whole content retrieved via httpURLConnection (or whatever you use),
second after parsing by the rdfa parser and third after you treatment of the hexBinary.

wkr j

[1] http://www.w3.org/2006/07/SWD/RDFa/testsuite/

----- Original Message -----
From: "Henry Story" <henry.story@bblfish.net>
To: "Jürgen Jakobitsch" <j.jakobitsch@semantic-web.at>, "Damian Steer" <pldms@mac.com>
Cc: "public-xg-webid@w3.org XG" <public-xg-webid@w3.org>
Sent: Friday, January 6, 2012 1:49:46 PM
Subject: rdfa parsing issue -- was: fixed https://foafssl.org/test/WebId


On 6 Jan 2012, at 02:10, Henry Story wrote:

> 
> On 6 Jan 2012, at 01:53, Henry Story wrote:
>>> 
>>> note : still i get "keys don't match"
>> 
>> Mhh. Well perhaps another error now, or perhaps I just did not fix the error correctly.
>> Perhaps if you send me your public/private key, then I can continue debugging it from here without going over the list.
> 
> I am starting to think it is my rdfa parser that has a problem. So I'll look into that in more detail first thing tomorrow.

Yes, the problem comes from an issue with parsing your content. I am using Damian Steers rdfa parser, which he himself claims is quick and dirty https://github.com/shellac/java-rdfa

Shellac's parser parses the xhtml correctly as xhtml in fact, but when the html parser is used it comes to a different conclusion. This is I suppose the huge problem of dealing with metadata in dirty old html. Now you may ask: why am I parsing it as html when it is quite clearly xhtml? Well that is because you are serving your content as html. 

--------------8<----------------------------------
$ curl -I  http://2sea.org/sea.jsp 
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=737470C327A5268D1F28F146049BE510; Path=/
Content-Type: text/html;charset=UTF-8
Content-Length: 1996
Date: Fri, 06 Jan 2012 12:44:05 GMT
------------------------------------------------

Here the output in xhtml seems to be correct

--------------8<----------------------------------
$ rdfa.sh --format XHTML http://2sea.org/sea.jsp 
     @prefix : <http://www.w3.org/ns/auth/cert#> .
    @prefix sea: <http://2sea.org/sea.jsp#> .
    
    <http://2sea.org/sea.jsp>     a <http://xmlns.com/foaf/0.1/PersonalProfileDocument>;
         <http://xmlns.com/foaf/0.1/maker> sea:j .
    
    sea:j     a <http://xmlns.com/foaf/0.1/Person>;
         :key  [
             a :RSAPublicKey;
             :exponent 65537;
             :modulus "986534d06d133821f40157c15891857d537d20af028656ddca1caf93cd3cc9104d4f172cf14d6102ddf13b16852c09b3fccb0a2fe2a2e895b8f5993fd87321d1a03b656cac78726715f7198f7c5d539b8197fd35bafe274ceade6694ec38c86609a25d6988f6e749f401c37145ac11142d84d775f4f929dbcd6ba809ab4e39b3dc36087062efcf73050e313f60929b7f969b8b6bc80e25ef6000bbe66d6925aba09aed8a16271d6d9651edb27c6bb50a1ffc6bc7d8bfe8346965cf0b5993385352157fb7df1b143a97ac7d642428c1f87dd7988364115dcfa05cfb020b595417feb54febaa8ac4a81c40ba9ac1dc6a097f53b379ba9850e0a45e2f1c452f3743"^^<http://www.w3.org/2001/XMLSchema#hexBinary> ];
         <http://xmlns.com/foaf/0.1/depiction> <http://2sea.org/2sealogo.png>;
         <http://xmlns.com/foaf/0.1/name> "jürgen" .    
------------------------------------------------


But as you can see with html the key is said to belong to the page, not to the user anymore


--------------8<----------------------------------
$ rdfa.sh --format HTML http://2sea.org/sea.jsp 

     @prefix : <http://www.w3.org/ns/auth/cert#> .
    @prefix sea: <http://2sea.org/sea.jsp#> .
    
    <http://2sea.org/2sealogo.png>     :key  [
             a :RSAPublicKey;
             :exponent 65537;
             :modulus "986534d06d133821f40157c15891857d537d20af028656ddca1caf93cd3cc9104d4f172cf14d6102ddf13b16852c09b3fccb0a2fe2a2e895b8f5993fd87321d1a03b656cac78726715f7198f7c5d539b8197fd35bafe274ceade6694ec38c86609a25d6988f6e749f401c37145ac11142d84d775f4f929dbcd6ba809ab4e39b3dc36087062efcf73050e313f60929b7f969b8b6bc80e25ef6000bbe66d6925aba09aed8a16271d6d9651edb27c6bb50a1ffc6bc7d8bfe8346965cf0b5993385352157fb7df1b143a97ac7d642428c1f87dd7988364115dcfa05cfb020b595417feb54febaa8ac4a81c40ba9ac1dc6a097f53b379ba9850e0a45e2f1c452f3743"^^<http://www.w3.org/2001/XMLSchema#hexBinary> ] .
    
    <http://2sea.org/sea.jsp>     a <http://xmlns.com/foaf/0.1/PersonalProfileDocument>;
         <http://xmlns.com/foaf/0.1/maker> sea:j .
    
    sea:j     a <http://xmlns.com/foaf/0.1/Person>;
         <http://xmlns.com/foaf/0.1/depiction> <http://2sea.org/2sealogo.png>;
         <http://xmlns.com/foaf/0.1/name> "jürgen" .
------------------------------------------------

RDFA 1 is defined in xhtml only I understand, so it is true that we are going beyond what the spec by trying to parse html too. Perhaps this will be a lot simplified with rdfa1.1 which can be made to work with html5.

Perhaps this is a simple parsing bug that can be fixed by Damian, perhaps not....


Henry





-- 
| Jürgen Jakobitsch, 
| Software Developer
| Semantic Web Company GmbH
| Mariahilfer Straße 70 / Neubaugasse 1, Top 8
| A - 1070 Wien, Austria
| Mob +43 676 62 12 710 | Fax +43.1.402 12 35 - 22

COMPANY INFORMATION
| http://www.semantic-web.at/

PERSONAL INFORMATION
| web   : http://www.turnguard.com
| foaf  : http://www.turnguard.com/turnguard
| skype : jakobitsch-punkt

Received on Friday, 6 January 2012 15:01:56 UTC