<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ejohansson.se &#187; js</title>
	<atom:link href="http://ejohansson.se/tags/js/feed/" rel="self" type="application/rss+xml" />
	<link>http://ejohansson.se</link>
	<description>Random bits about Linux, programming, computers and occasionally other stuff.</description>
	<lastBuildDate>Sun, 18 Apr 2010 20:23:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Displaying cite attribute in&#160;blockquotes</title>
		<link>http://ejohansson.se/archives/2006/02/02/displaying-cite-attribute-in-blockquotes/</link>
		<comments>http://ejohansson.se/archives/2006/02/02/displaying-cite-attribute-in-blockquotes/#comments</comments>
		<pubDate>Thu, 02 Feb 2006 18:42:01 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://ejohansson.se/archives/2006/02/02/displaying-cite-attribute-in-blockquotes/</guid>
		<description><![CDATA[While surfing the web I found a page where I learned that blockquote tags have the attributes cite (URI for source document) and title. They seemed like perfect candidates for displaying as a link at the bottom of the quote. So, I went searching.

The first thing I found was a blog post about Dynamically labeling [...]]]></description>
			<content:encoded><![CDATA[<p>While surfing the web I found a page where I learned that <a href="http://www.w3.org/TR/html4/struct/text.html#h-9.2.2">blockquote tags</a> have the attributes <em>cite</em> (URI for source document) and <em>title</em>. They seemed like perfect candidates for displaying as a link at the bottom of the quote. So, I went searching.</p>
<p><span id="more-39"></span></p>
<p>The first thing I found was a blog post about <a href="http://www.holovaty.com/blog/archive/2002/12/20/0454">Dynamically labeling blockquotes with CSS</a>. This seemed like a good idea, but had the drawback that the link wasn&#8217;t clickable. But in a comment I found a link to a blog post, <a href="http://simon.incutio.com/archive/2002/12/20/blockquoteCitations">Blockquote citations</a>, which implemented what I wanted using javascript.</p>
<p>So I downloaded the javascript, modified it a bit to allow the title attribute to be used as link text and it&#8217;s now fully operating.</p>
<p>If you wish, you can download my slightly <a href="http://files.ejohansson.se/js/blockquotes.js">modified version</a>. But all credit should go to <a href="http://simon.incutio.com/">Simon Willison</a>.</p>
<p>Want to see it in action? Here goes</p>
<blockquote cite="http://ejohansson.se" title="Erik Johansson"><p>
I&#8217;m originally from a small town in the north of Sweden called Piteå.
</p></blockquote>
<p>Produced from the following code</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">blockquote</span> <span style="color: #000066;">cite</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ejohansson.se&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Erik Johansson&quot;</span>&gt;</span>
I'm originally from a small town in the north of Sweden called Piteå.
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">blockquote</span>&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2006/02/02/displaying-cite-attribute-in-blockquotes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
