[uf-discuss] What do I do when I have images with different licenses
on a single page?
Toby A Inkster
mail at tobyinkster.co.uk
Mon Dec 15 05:37:27 PST 2008
Jorel Pi wrote:
> If I had a page with 2 images, each having a different license. What
> am I supposed to do?
This is a known problem with rel=license, and the reason why
rel=license has been (at least for now) removed as a component of the
current hAudio, figure and hRecipe drafts. In general, the scoping of
properties is an area where microformats have always been murky.
> I was thinking of just using span with the name of the license as
> the class.
This is perfectly good POSH, but obviously no parsers will pay any
attention to it. If you're looking for something which will be
machine readable, then you probably want RDFa. RDFa has very clear
scoping rules. An example might be:
<img src="foo.jpeg" alt="A Foo">
The image above is licensed under
<a rel=":license" href="foo.html">Foo licence</a>.
The image below is licensed under
<a rel=":license" href="bar.html">Bar licence</a>.
<img src="bar.jpeg" alt="A Bar">
The colons in the rel values are not actually needed, but they have
the effect of "masking" the rel="license" from non-RDFa processors.
Note that the "about" attribute is RDFa-specific, so if you want your
page to validate, you'll need to use the RDFa doctype, which is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
Toby A Inkster
<mailto:mail at tobyinkster.co.uk>
More information about the microformats-discuss