Re: [foaf-dev] foaf validator
Jonas Smedegaard <[email protected]> Sun, 7 Aug 2011 14:23:59 +0200
| Newsgroups | gmane.comp.web.rdfweb |
|---|---|
| Message-ID | <[email protected]> |
On 11-08-06 at 11:08am, Mischa Tuffield wrote: > On 6 Aug 2011, at 01:13, Jonas Smedegaard wrote: > > I have fought for a long time to both support content-negotiation > > and serve RDF as nice directory URLs rather than exposing the ugly > > extension. I use Apache2 but haven't figured out how to make it > > rank RDF higher than GPG sigs. > > So, yeah the problem the validator is choking is because of its turtle > parser isn't great. This is a bug in the RAP PHP library, which isn't > maintained anymore, I have forked it in github, and will look into why > n3 parser is crapping out in the future, but not today... Uhm, possibly that issue plays a role too, but what I meant above was *not* that Turtle was served instead of RDF/XML, but that my current Apache2 content negotiation setup favors "*.rdf.pgp" over "*.rdf". > But to your point above, your apache setup isn't quite right: > > When i : > > `curl -H 'Accept: application/rdf+xml, application/rdf+turtle, application/x-turtle, text/turtle, application/xml, */*' 'http://dr.jones.dk/me/'` > > I get back turtle ... I believe your test is flawed: when *both* leaving out "q" ratings and including a wildcard, it is essentially equal to this: curl -H 'Accept: */*' 'http://dr.jones.dk/me/' This is probably what you intended: curl -H 'Accept: application/rdf+xml, application/rdf+turtle;q=0.5, application/x-turtle;q=0.4, text/turtle;q=0.3, application/xml;q=0.2, */*;q=0.1' 'http://dr.jones.dk/me/' ...which delivers the RDF/XML format :-) Alternatively if you wanted to test _my_ priorities then you should leave out the trailing wildcard, like this: curl -H 'Accept: application/rdf+xml, application/rdf+turtle, application/x-turtle, text/turtle, application/xml' 'http://dr.jones.dk/me/' ...which delivers the Turtle format. Which is IMO not "wrong" of my setup, but wrong of you if really you favor RDF/XML over Turtle. :-) The issue I raised is this: curl -H 'Accept: application/rdf+xml, application/pgp-signature' 'http://dr.jones.dk/me/' ...which delivers the PGP signature rather than the RDF/XML. Hmm. It occurs to me just now that the GPG signature really isn't same content in a different format, so should simply use a different stem. Will try that after posting this (so the test right above hopefully leads to serving the RDF/XML pretty soon). > RAP's rdfxml parser is way better than its turtle/n3 one, if you could > have a look at your http://dr.jones.dk/me/ to make it return RDF/XML > when a client says it prefers it then the validator will work, till i > look at the n3 parsing. As argued above I claim that my server _does_ respect RDF/XML favored over Turtle - when properly hinted! > This is the best description of how to set up your apache instance to > server up conneg'd RDF: > > http://www.w3.org/TR/swbp-vocab-pub/ Thanks. That is indeed a nice document (I knew it already). Does not include GPG signing in its examples, though, which is (or was) my problem. > > Took me some time to find a method that works both ways: I can > > generate RDF and from the RDF generate the exact same Turtle file. > > Added that reverse script now as well: rdf2turtle.sh > > Um, I think there is some confusion when you use the term 'RDF', you > seem to use it to refer to RDF/XML. This is not the case, 'RDF' is a > data model as per the 'RDF Concepts/Abstract syntax' W3C note, RDF/XML > (ugly) and Turtle (pretty) are both serialisation of the RDF > data-model... A minor point, thought you appreciate it though. You are right, off course. And I appreciate being corrected! > Furthermore, libraptor, and the command line tool which comes with it > `rapper`, is totally the tool of awesome you want when converting > between the various RDF serialisations. Agreed. My scripts are essentially small wrappers around rapper. > You must have that installed on your machine, I recall you pointing to > the ubuntu bug report (which I didn't understand) about libraptor1 and > libraptor2 dependency stuff.. hrrmm. You should totally check it out, > it is an awesome bit of RDF conversion magic. And finally on this > rant, I keep saying this `if libraptor can't parse it, it isn't RDF > ...` :) I do not recall that conversation, but most likely I have referred to a _Debian_ bug (I am a Debian Developer and use only "the real thing", not Ubuntu or any other derivative). > > Oh, btw: I thought I'd done the WoT setup properly using GPG > > signing. What am I missing there to be "compliant" with your > > validator? > > You have the following relevant triples [details snip] > Which are fine I guess, but they are leaving "a lot to the > imagination", what my validator is checking for is for more of the > details of your GPG key to be listed within the RDF, [working example snipped] Thanks. Quite helpful. No space in my brain to fully grasp that at the moment, though, so will postpone further tuning of my FOAF for later: Have a deadline on a webdesign for a client to reach before I go to CCCamp11 to promote FreedomBox on tuesday and one week forward. Kind regards, - Jonas P.S. Gave "Walking dead" a try but is not to the liking of me and my girlfriend. Thanks anyway for the (implicit) suggestion. -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private _______________________________________________ foaf-dev mailing list foaf-dev-RyYwo1q5J+qsOXdr9/[email protected] http://lists.foaf-project.org/mailman/listinfo/foaf-dev
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCgAGBQJOPoPcAAoJECx8MUbBoAEhdoQP/180U4Cd/8XG070HZNc6l5Tb nQfDLes1Os1a7tgkGznBskjMa8P+Ako8UW2p4Q00q/dT83QdavxV3LPhLIevjEDC 6ch9wGWCtRgyFRhN5frF8gJDTi1REeTV1f2BX8/s7O/tPfE4C5tzyXqu036FOVBk 0kPjBMZZn2N4mx63tXXPjPn7OhPXWihDXfIC24QrcW6BS1GJIHI+lKJxKvE3DjHz V2h5F7QtcdA0Ba9LkgkIpnBVilMT9WG65OxFrb78SVhOZUSum5TYend6nWrLzann JGvvken5D3zClmaRUJ2Myes6FO6z5tzpz3uAfUFZB3jhQQZcypWafNcZiL3lFezG LdmNSngxDZ1S1ck0z8wpiEL88sUb6v4CaFgTlkgiAmKy5r5FGtBYddV7WBCOyw5A au/uLdHTZAX29xe3J6PN6RY0LL0KmFCdBf+q6xH1oNvQt3IBjUX8MeHuwNtZAN8+ 3kuyq8Nr384NxRQAvzU/uDj0bKUJPlGwbYKIRYYhMxiIP8Ox+kE+43yZUfgstE0i +Ia8NDDSCLQRQzKnaFtzvNLsbauVFbPGIA296vTFkLzxQMxd8O0GHEqI/61WrK0H +TomI9aqO3GWJeq6+mqxXRXKSe2XYuk4FQsEJRlr7HfyuyHXH8swdEi2ZDFwZ2CP /oRG4CuyW2Kft7JCNTly =r33j -----END PGP SIGNATURE-----