W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > March 2008

Re: foaf:sha1 property with img src=

From: Daniel Renfer <duck@kronkltd.net>
Date: Mon, 31 Mar 2008 08:05:39 -0400
Message-ID: <10743d6d0803310505l48c88e9cx78f1de4f3dbd647e@mail.gmail.com>
To: public-rdf-in-xhtml-tf@w3.org
On Mon, Mar 31, 2008 at 7:48 AM, Dan Brickley <danbri@danbri.org> wrote:

>
>
> OK, this gave me a headache. Can anyone help?
>
> (I don't mind the fact I got a headache; once we work out patterns,
> people will copy/paste them, and test. inventing patterns is harder)
>
> I want to express the foaf:sha1 property of an image in my homepage
> (which already uses RDFa):
>
>  From http://danbri.org/
>
> <img rel="foaf:depiction" src="danbri-txt.jpg"
>      alt="danbri" style="float: center"/>
>
> ...this was already there, saying the picture was a depiction of me. I
> want to add literal valued property of danbri-txt.jpg now, giving its
> hash. I was wondering if it could be done with 'rev' and 'property' but
> suspect it needs reorganizing with <span>...
>
> The hash of this file is
> $ sha1sum danbri-txt.jpg
> 58d174f20c039289544b2364c5c21295df2e4a2b  danbri-txt.jpg
>
> Douglas Crockford just posted a proposal for a hash= attribute in HTML,
> to allow user agents to cache common files like jquery.js
>
> http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=789
>
> [[
> Any HTML tag that accepts a src= or href= attribute should also be
> allowed to take a hash= attribute. The value of a hash attribute would
> be the base 32 encoding of the SHA of the object that would be
> retrieved. This does a couple of useful things.
>
> First, it gives us confidence that the file that we receive is the one
> that we asked for, that it was not replaced or tampered with in transit.
>
> Second, browsers can cache by hash code. If the cache contains a file
> that matches the requested hash=, then there is no need to go to the
> network regardless of the url. This would improve the performance of
> Ajax libraries because you would only have to download the library once
> for all of the sites you visit, even if every site links to its own copy.
> Tags: www, security
>
> Tuesday March 25, 2008 - 11:02am (PDT)
> ]]
>
> BTW this brings up an old 'works manifestations expressions and items'
> FRBR issue with foaf:sha1 and the slippery problem of giving identity
> criteria for "docments"; I originally defined it as an inverse
> functional property, which would mean that we could conclude two objects
> with the same hash are 'the same thing'. Then I backed off from that,
> realising that for example, two different people could create zero-byte
> files (with same hash) on different dates; and if we had a creation-date
> functional property, we'd get a contradiction. But this scenario from
> Douglas Crockford is I think a nice use case for these ideas.
>
> http://xmlns.com/foaf/spec/#term_sha1 documents the current messy state
> of the property, but for purposes of this thread, can we just talk RDFa
> syntax first and get the notation right?
>
> cheers,
>
> Dan
>
> ps. does anyone fancy hacking about in eg. Firefox to see about actually
> implementing this? could be scary deep in the core code, but would be a
> cool hack...
>
> --
> http://danbri.org/


I ran into a similar issue when I was trying to convert my FOAF file into a
prose XHTML+RDFa document. My problem was, how can I link to an image, but
also specify the thumbnail version of that image?

<#me>
    foaf:depiction     <me.jpg>.

<me.jpg>
    foaf:thumbnail    <me-thumb.jpg>.

It seems like the answer would be the same for both of them. It's a shame I
can't just put a span inside of <img/>.

Daniel E. Renfer
http://kronkltd.net/
Received on Monday, 31 March 2008 12:06:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:27 UTC