W3C home > Mailing lists > Public > public-xg-webid@w3.org > April 2011

Re: HOWTO for serving a WebID using Apache’s .htaccess file.

From: Henry Story <henry.story@bblfish.net>
Date: Fri, 8 Apr 2011 09:21:10 +0200
Cc: andrei@fcns.eu, public-xg-webid@w3.org
Message-Id: <8691F569-6DE4-465C-BE6B-EF54EDF8753E@bblfish.net>
To: bergi <bergi@axolotlfarm.org>

On 8 Apr 2011, at 00:11, bergi wrote:

> I have created a .htaccess file according to this howto. Now I was
> looking for a nice and generic way to create the RDFa output.

Ah I see you developed a templating mechanism, like asp or jsp but tuned to RDF.

On that topic, in http://clerezza.org/ Reto used the power of Scala to create what is a 
very concise way of doing the same thing. Essentially you get a GraphNode which is a pair
of a graph and a node in it, and you can then write things like

<a href={agent/-CERT.identity}>{agent/FOAF.name}</a>

> Finally
> here is my solution: "lightweight RDF query" [1]. If you want to see a
> live demo, just have a look at my webid [2].

using rapper, the redland command line too, I get

$ rapper -i rdfa http://www.bergnet.org/webid.php -o turtle
rapper: Parsing URI http://www.bergnet.org/webid.php with parser rdfa
rapper: Serializing with serializer turtle
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <http://www.w3.org/1999/xhtml> .
@prefix cert: <http://www.w3.org/ns/auth/cert#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rsa: <http://www.w3.org/ns/auth/rsa#> .

<http://www.bergnet.org/webid.rdf#me>
    a foaf:Person .

[]
    a rsa:PublicKey ;
    cert:identity <http://www.bergnet.org/webid.rdf#me> ;
    rsa:modulus [
        cert:hex "a994406b72362ae4d4e7d22247ee780e0e37e95bc4a1612df8729a2f6e31716a98a80a45d3f1ea1e3232a55579af0886cac528446462f19138084dab7947f33330e12cc07ee6a81f1c24325f7c2057563806dc30e3602b69ff4add0fa2f85fc942608c4bfcaf0ce337288ab8cabeb0e08d235957f49fd87547a361c514db0f1f"
    ] ;
    rsa:public_exponent [
        cert:decimal "65537"
    ] .



Since you are starting off I would recommend using the literal notation that we describe in the current spec. You RDFa will be more concise, and it will be a lot more flexible too.

   Henry


> 
> [1] https://www.axolotlfarm.org/~bergi/projects/rme/lrdfquery/
> [2] http://www.bergnet.org/webid
> 
> Am 05.04.2011 09:10, schrieb Henry Story:
>> 
>> On 4 Apr 2011, at 11:10, Andrei Sambra wrote:
>> 
>>> Hello!
>>> 
>>> I wrote a quick howto[1] on publishing a WebID, while taking into
>>> account the possibility of serving different files depending on the type
>>> of request, (i.e. file.php for text/html and file.rdf for rdf/xml).
>>> Please let me know what you think before I add it to the list of HOWTOs.
>> 
>> Looks good to me.
>> 
>> I would add a little section showing how you can then request multiple representations
>> using curl -i -H "Accept: ..." -L http://
>> 
>> Also explain the Content-Location: field 
>> 
>> Unless you show that people won't understand what they have gained.
>> 
>>> 
>>> Andrei
>>> 
>>> [1]
>>> http://fcns.eu/2011/04/how-to-serve-a-webid-using-apache-htaccess-file/
>>> 
>>> 
>>> 
>>> 
>> 
>> Social Web Architect
>> http://bblfish.net/
>> 
>> 
>> 

Social Web Architect
http://bblfish.net/
Received on Friday, 8 April 2011 07:21:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:06:23 UTC