License To rel

Published 20 years, 8 months past

If you thought XFN or VoteLinks were the last (or only) word on lightweight semantic link annotation, think again.  Tantek writes about the idea of adding a license value to indicate a link that points to licensing terms.  In his post, the expression of this idea is centered around Creative Commons (CC) licenses, but as he says, any license-link could be so annotated.  Apparently the CC folks agree, because their license generator has been updated to include rel="license" in the markup it creates. Accordingly, I’ve updated my CC license link for the Color Blender to carry rel="license", thus making it easier for a spider to auto-discover the licensing terms for the Color Blender.

Tantek also said of the idea of applying CSS to documents that uniquely styles license-links:

I wonder who will be the first to post a user style sheet that demonstrates this.

Ooo, me, me!  Well, not quite.  I don’t have a complete user stylesheet for download, but here are some quick rules I devised to highlight license links.  Add any of them to your user stylesheet, or you can use these as the basis for your own styles.  (Sorry, but they won’t work in Internet Explorer, which doesn’t support attribute selectors.)

/* simple styles */
*[rel~="license"] {font-weight: bold;}
*[rel~="license"] img {border: 3px double; color: inherit;
  padding: 1px;}

/* add a "legal" icon at the beginning of the link */
*[rel~="license"]:before {content: url(legal.gif);}

Here’s my question: should the possible values be extended?  Because I’d really like to be able to insert information based on what kind of license is being referenced.  For example, suppose there were a c-commons value for rel; that way, authors could declare a link to be rel="c-commons license".  Then we could use a rule like:

*[rel~="c-commons"]:before {content: url(c-commons.gif);}

…thus inserting a Creative Commons logo before any link that points to a CC license.  At the moment, it’s highly likely that the only rel="license" links are going to point to CC licenses, but as we move forward I suspect that will be less and less true.  I hope we’ll soon see some finer grains to this particular semantic extension.

If you don’t like using generated content for whatever reason, you could modify the rule to put the icon in the background instead, using a rule something like this:

*[rel~="c-commons"] {background: url(c-commons.gif) no-repeat;
  padding-left: 15px;}

The usual reason to avoid generated content is that IE doesn’t support it, but then IE doesn’t support attribute selectors either, as I mentioned.  So don’t add any of these rules to an IE user stylesheet.  Use Firefox, Safari, Opera, or one of the other currently-in-development browsers instead.

In other news, I was tickled pink (or maybe a dusky red) to see that for sol 34, one of the “wake-up” songs for the Spirit team was The Bobs’ Pounded on a Rock.  My hat’s off to you, Dr. Adler!  I’ve been listening to that particular album recently, mostly to relearn the lyrics.  I’ve been singing to Carolyn when I feed her, and some favorites of ours are Plastic or Paper, Now I Am A Hippie Again, Corn Dogs, and of course Food To Rent.  It’s awfully cute that she smiles at me when I sing to her, mostly because I know one day she’ll grow up, learn about things like “being on key,” and stop smiling when I sing.

In the meantime, though, she’s perfectly happy to rock on! Carolyn, sitting in a chair with her lower half covered by a blanket, raises her left hand above her head with the index and pinky fingers extended, exactly in the manner of hard rockers and head-bangers the world over.


Comments are closed.