<?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>Keith's Blog &#187; AtomPub</title>
	<atom:link href="http://kfahlgren.com/blog/category/atompub/feed/" rel="self" type="application/rss+xml" />
	<link>http://kfahlgren.com/blog</link>
	<description>Keith on XML, Publishing, Ruby, Birds, &#038; San Francisco</description>
	<lastBuildDate>Fri, 09 Apr 2010 15:59:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Talk: AtomPub Makes You Cool at Code4Lib2008</title>
		<link>http://kfahlgren.com/blog/2008/02/26/talk-atompub-makes-you-cool-at-code4lib2008/</link>
		<comments>http://kfahlgren.com/blog/2008/02/26/talk-atompub-makes-you-cool-at-code4lib2008/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 01:22:45 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[AtomPub]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Talks]]></category>

		<guid isPermaLink="false">http://kfahlgren.com/blog/2008/02/26/talk-atompub-makes-you-cool-at-code4lib2008/</guid>
		<description><![CDATA[I just gave a lightning talk at the fabulous code4lib conference. My boss at ]]></description>
			<content:encoded><![CDATA[<p>I just gave a lightning talk at the <a href="http://code4lib.org/conference/2008/">fabulous code4lib conference</a>. My boss at <a href="http://www.oreilly.com>O&#8217;Reilly</a> sponsored it and he gave me the unexpected chance to come to Portland and learn about what librarians and libraries are doing (neat stuff). The talk was just a little on why the <a href="http://bitworking.org/projects/atom/rfc5023.html">Atom Publishing Protocol</a> was cool and how it could teach people about <a href="http://www.oreilly.com/catalog/9780596529260/">RESTful Web Services</a> and HTTP (again). Here are the slides: <a href="http://kfahlgren.com/talks/code4lib2008/atompub_teaches_rest_http.pdf<br />
">http://kfahlgren.com/talks/code4lib2008/atompub_teaches_rest_http.pdf</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://kfahlgren.com/blog/2008/02/26/talk-atompub-makes-you-cool-at-code4lib2008/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Present Well (like Joe Gregorio)</title>
		<link>http://kfahlgren.com/blog/2007/07/25/how-to-present-well-like-joe-gregorio/</link>
		<comments>http://kfahlgren.com/blog/2007/07/25/how-to-present-well-like-joe-gregorio/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 23:42:18 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[AtomPub]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Oscon07]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://kfahlgren.com/blog/2007/07/25/how-to-present-well-like-joe-gregorio/</guid>
		<description><![CDATA[A nice tidbit from Joe&#8217;s talk at Oscon 2007:
Exposition: I can lie if you can learn
]]></description>
			<content:encoded><![CDATA[<p>A nice tidbit from <a href="http://conferences.oreillynet.com/cs/os2007/view/e_sess/12371">Joe&#8217;s talk at Oscon 2007</a>:</p>
<blockquote><p>Exposition: I can lie if you can learn</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://kfahlgren.com/blog/2007/07/25/how-to-present-well-like-joe-gregorio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Partial Updates: A Simpler Strawman?</title>
		<link>http://kfahlgren.com/blog/2007/06/10/partial-updates-a-simpler-strawman/</link>
		<comments>http://kfahlgren.com/blog/2007/06/10/partial-updates-a-simpler-strawman/#comments</comments>
		<pubDate>Sun, 10 Jun 2007 19:51:45 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[AtomPub]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PATCH]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://kfahlgren.com/blog/2007/06/10/partial-updates-a-simpler-strawman/</guid>
		<description><![CDATA[James Snell has been working some interesting things as the work on the Atom Publishing Protocol spec winds down. Most recently, he posted some thoughts on how to effectively communicate partial updates to APP servers using HTTP PATCH. 
[UPDATE: James points out the obvious drawback to this approach in his response.]
One of the things that [...]]]></description>
			<content:encoded><![CDATA[<p>James Snell has been working some interesting <a href="http://www.snellspace.com/wp/?p=682">things</a> as the work on the <a href="http://ietfreport.isoc.org/idref/draft-ietf-atompub-protocol/">Atom Publishing Protocol spec</a> winds down. Most recently, <a href="http://www.snellspace.com/wp/?p=683">he posted some thoughts</a> on how to effectively communicate partial updates to APP servers using HTTP PATCH. </p>
<p>[UPDATE: James points out the obvious drawback to this approach <a href="http://www.snellspace.com/wp/?p=684">in his response</a>.]</p>
<p>One of the things that surprised me when I met other APP implementors at the <a href="http://www.oreillynet.com/xml/blog/2007/04/atom_publishing_protocol_inter.html">interop</a> was the relative lack of concern they seemed to have about the actual content inside their <code>&lt;atom:entry&gt;</code>s. This may have simply been a simplification on their part for the sake of testing  (<a href="https://ape.dev.java.net/source/browse/ape/src/samples.rb?view=markup">&#8220;if it can accept a single line of XHTML div it can accept <em>anything</em>&#8220;</a>, essentially) rather than their real views, but to someone very concerned about perfect content fidelity, it sorta scared me. These tiny <code>&lt;atom:entry&gt;</code>s might hide the some of the problems that APP will face in the wild, particularly for document repositories.</p>
<p>Long before the interop, we&#8217;d decided internally at O&#8217;Reilly to use the Media Resources rather than the <code>&lt;atom:entry&gt;</code> container (in large part because of the size of our DocBook documents, often over 2MB) for our document repository implementation. Because of the larger size of our content blocks, the sort of partial updates that James is thinking about might be quite cool. </p>
<p>The core of James&#8217; strawman is an XML delta syntax (with credit due to <a href="http://andyroberts007.blogspot.com/2006/04/delta-web_03.html">Andy Roberts</a>&#8216; work on the same) for HTTP PATCH with 8  operations: insert-before, insert-after, insert-child, replace, remove, remove-all, set-attribute and remove-attribute. Coming at this problem with my experience in document transformation and XSLT, I saw 7 of those operations (everything but &#8216;replace&#8217;) as unnecessary. The basic inspiration is thinking about each operation as an XSLT template. Mentally translate the <code>d:replace/@path</code> into <code>xsl:template/@match</code> and swap the bodies and you&#8217;ll be with me (with luck!).</p>
<p>Here&#8217;s the specific rundown of the 7 operations other than &#8216;replace&#8217; working with James&#8217; simple example <code>&lt;atom:entry&gt;</code>:</p>
<pre>
<font color="#ffff00"><b> 1 </b></font><font color="#00ffff"><b>&lt;?</b></font><font color="#00ff00"><b>xml</b></font><font color="#00ff00"><b> </b></font><font color="#00ff00"><b>version</b></font>=<font color="#ff40ff"><b>&quot;1.0&quot;</b></font><font color="#00ffff"><b>?&gt;</b></font>
<font color="#ffff00"><b> 2 </b></font><font color="#00ffff"><b>&lt;</b></font><font color="#00ffff"><b>entry</b></font><font color="#00ffff"><b> </b></font><font color="#00ff00"><b>xmlns</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b> 3 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#00ffff"><b>id</b></font><font color="#00ffff"><b>&gt;</b></font><a href="http://example.org/foo/boo">http://example.org/foo/boo</a><font color="#00ffff"><b>&lt;/id&gt;</b></font>
<font color="#ffff00"><b> 4 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#00ffff"><b>title</b></font><font color="#00ffff"><b>&gt;</b></font>Test<font color="#00ffff"><b>&lt;/title&gt;</b></font>
<font color="#ffff00"><b> 5 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#00ffff"><b>updated</b></font><font color="#00ffff"><b>&gt;</b></font>2007-12-12T12:12:12Z<font color="#00ffff"><b>&lt;/updated&gt;</b></font>
<font color="#ffff00"><b> 6 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#00ffff"><b>summary</b></font><font color="#00ffff"><b>&gt;</b></font>Test summary<font color="#00ffff"><b>&lt;/summary&gt;</b></font>
<font color="#ffff00"><b> 7 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#00ffff"><b>author</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b> 8 </b></font>    <font color="#00ffff"><b>&lt;</b></font><font color="#00ffff"><b>name</b></font><font color="#00ffff"><b>&gt;</b></font>James<font color="#00ffff"><b>&lt;/name&gt;</b></font>
<font color="#ffff00"><b> 9 </b></font>  <font color="#00ffff"><b>&lt;/author&gt;</b></font>
<font color="#ffff00"><b>10 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#00ffff"><b>link</b></font><font color="#00ffff"><b> </b></font><font color="#00ff00"><b>href</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://example.org">http://example.org</a>&quot;</b></font><font color="#00ffff"><b>/&gt;</b></font>
<font color="#ffff00"><b>11 </b></font><font color="#00ffff"><b>&lt;/entry&gt;</b></font>
</pre>
<p>Note: You&#8217;ll have to imagine these working on a much larger XML document than my examples to understand the importance.</p>
<h3>insert-before</h3>
<pre>
<font color="#ffff00"><b> 1 </b></font>PATCH /collection/entry/1 HTTP/1.1
<font color="#ffff00"><b> 2 </b></font>Host: example.org
<font color="#ffff00"><b> 3 </b></font>Content-Type: application/delta+xml
<font color="#ffff00"><b> 4 </b></font>Content-Length: nnnn
<font color="#ffff00"><b> 5 </b></font>
<font color="#ffff00"><b> 6 </b></font><font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta</b></font>
<font color="#ffff00"><b> 7 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>d</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://purl.org/atompub/delta">http://purl.org/atompub/delta</a>&quot;</b></font>
<font color="#ffff00"><b> 8 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b> 9 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>atom</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b>10 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>b</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://example.org/foo">http://example.org/foo</a>&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>11 </b></font>
<font color="#ffff00"><b>12 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- substitute for insert-before</b></font>
<font color="#ffff00"><b>13 </b></font><font color="#00ffff"><b>       /atom:entry/atom:author/atom:name</b></font>
<font color="#ffff00"><b>14 </b></font><font color="#00ffff"><b>       an atom:email --</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>15 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace</b></font><font color="#00ffff"><b> </b></font><font color="#00ff00"><b>path</b></font>=<font color="#ff40ff"><b>&quot;/atom:entry/atom:author&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>16 </b></font>    <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>author</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>17 </b></font>      <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>email</b></font><font color="#00ffff"><b>&gt;</b></font>james@example.org<font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>email&gt;</b></font>
<font color="#ffff00"><b>18 </b></font>      <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>name</b></font><font color="#00ffff"><b>&gt;</b></font>James<font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>name&gt;</b></font>
<font color="#ffff00"><b>19 </b></font>    <font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>author&gt;</b></font>
<font color="#ffff00"><b>20 </b></font>  <font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace&gt;</b></font>
<font color="#ffff00"><b>21 </b></font><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta&gt;</b></font>
</pre>
<h3>insert-after</h3>
<pre>
<font color="#ffff00"><b> 1 </b></font>PATCH /collection/entry/1 HTTP/1.1
<font color="#ffff00"><b> 2 </b></font>Host: example.org
<font color="#ffff00"><b> 3 </b></font>Content-Type: application/delta+xml
<font color="#ffff00"><b> 4 </b></font>Content-Length: nnnn
<font color="#ffff00"><b> 5 </b></font>
<font color="#ffff00"><b> 6 </b></font><font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta</b></font>
<font color="#ffff00"><b> 7 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>d</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://purl.org/atompub/delta">http://purl.org/atompub/delta</a>&quot;</b></font>
<font color="#ffff00"><b> 8 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b> 9 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>atom</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b>10 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>b</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://example.org/foo">http://example.org/foo</a>&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>11 </b></font>
<font color="#ffff00"><b>12 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- substitute for insert-after</b></font>
<font color="#ffff00"><b>13 </b></font><font color="#00ffff"><b>       /atom:entry/atom:author/atom:name</b></font>
<font color="#ffff00"><b>14 </b></font><font color="#00ffff"><b>       an atom:uri --</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>15 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace</b></font><font color="#00ffff"><b> </b></font><font color="#00ff00"><b>path</b></font>=<font color="#ff40ff"><b>&quot;/atom:entry/atom:author&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>16 </b></font>    <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>author</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>17 </b></font>      <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>name</b></font><font color="#00ffff"><b>&gt;</b></font>James<font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>name&gt;</b></font>
<font color="#ffff00"><b>18 </b></font>      <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>uri</b></font><font color="#00ffff"><b>&gt;</b></font><a href="http://example.org/blogs/james">http://example.org/blogs/james</a><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>uri&gt;</b></font>
<font color="#ffff00"><b>19 </b></font>    <font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>author&gt;</b></font>
<font color="#ffff00"><b>20 </b></font>  <font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace&gt;</b></font>
<font color="#ffff00"><b>21 </b></font><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta&gt;</b></font>
</pre>
<h3>insert-child</h3>
<pre>
<font color="#ffff00"><b> 1 </b></font>PATCH /collection/entry/1 HTTP/1.1
<font color="#ffff00"><b> 2 </b></font>Host: example.org
<font color="#ffff00"><b> 3 </b></font>Content-Type: application/delta+xml
<font color="#ffff00"><b> 4 </b></font>Content-Length: nnnn
<font color="#ffff00"><b> 5 </b></font>
<font color="#ffff00"><b> 6 </b></font><font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta</b></font>
<font color="#ffff00"><b> 7 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>d</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://purl.org/atompub/delta">http://purl.org/atompub/delta</a>&quot;</b></font>
<font color="#ffff00"><b> 8 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b> 9 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>atom</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b>10 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>b</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://example.org/foo">http://example.org/foo</a>&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>11 </b></font>
<font color="#ffff00"><b>12 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- substitute for insert-child</b></font>
<font color="#ffff00"><b>13 </b></font><font color="#00ffff"><b>       /atom:entry/atom:author</b></font>
<font color="#ffff00"><b>14 </b></font><font color="#00ffff"><b>       an atom:uri --</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>15 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace</b></font><font color="#00ffff"><b> </b></font><font color="#00ff00"><b>path</b></font>=<font color="#ff40ff"><b>&quot;/atom:entry/atom:author&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>16 </b></font>    <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>author</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>17 </b></font>      <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>name</b></font><font color="#00ffff"><b>&gt;</b></font>James<font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>name&gt;</b></font>
<font color="#ffff00"><b>18 </b></font>      <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>uri</b></font><font color="#00ffff"><b>&gt;</b></font><a href="http://example.org/blogs/james">http://example.org/blogs/james</a><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>uri&gt;</b></font>
<font color="#ffff00"><b>19 </b></font>    <font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>author&gt;</b></font>
<font color="#ffff00"><b>20 </b></font>  <font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace&gt;</b></font>
<font color="#ffff00"><b>21 </b></font><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta&gt;</b></font>
</pre>
<h3>remove</h3>
<pre>
<font color="#ffff00"><b> 1 </b></font>PATCH /collection/entry/1 HTTP/1.1
<font color="#ffff00"><b> 2 </b></font>Host: example.org
<font color="#ffff00"><b> 3 </b></font>Content-Type: application/delta+xml
<font color="#ffff00"><b> 4 </b></font>Content-Length: nnnn
<font color="#ffff00"><b> 5 </b></font>
<font color="#ffff00"><b> 6 </b></font><font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta</b></font>
<font color="#ffff00"><b> 7 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>d</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://purl.org/atompub/delta">http://purl.org/atompub/delta</a>&quot;</b></font>
<font color="#ffff00"><b> 8 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b> 9 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>atom</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b>10 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>b</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://example.org/foo">http://example.org/foo</a>&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>11 </b></font>
<font color="#ffff00"><b>12 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- substitute for remove</b></font>
<font color="#ffff00"><b>13 </b></font><font color="#00ffff"><b>       /atom:entry/atom:author/atom:name --</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>14 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace</b></font><font color="#00ffff"><b> </b></font><font color="#00ff00"><b>path</b></font>=<font color="#ff40ff"><b>&quot;/atom:entry/atom:author/atom:name&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>15 </b></font>  <font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace&gt;</b></font>
<font color="#ffff00"><b>16 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- yeah, this no atom:author is longer valid ..--</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>17 </b></font><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta&gt;</b></font>
</pre>
<h3>remove-all</h3>
<pre>
<font color="#ffff00"><b> 1 </b></font>PATCH /collection/entry/1 HTTP/1.1
<font color="#ffff00"><b> 2 </b></font>Host: example.org
<font color="#ffff00"><b> 3 </b></font>Content-Type: application/delta+xml
<font color="#ffff00"><b> 4 </b></font>Content-Length: nnnn
<font color="#ffff00"><b> 5 </b></font>
<font color="#ffff00"><b> 6 </b></font><font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta</b></font>
<font color="#ffff00"><b> 7 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>d</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://purl.org/atompub/delta">http://purl.org/atompub/delta</a>&quot;</b></font>
<font color="#ffff00"><b> 8 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b> 9 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>atom</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b>10 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>b</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://example.org/foo">http://example.org/foo</a>&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>11 </b></font>
<font color="#ffff00"><b>12 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- substitute for remove</b></font>
<font color="#ffff00"><b>13 </b></font><font color="#00ffff"><b>       /atom:entry/atom:author/atom:name --</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>14 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace</b></font><font color="#00ffff"><b> </b></font><font color="#00ff00"><b>path</b></font>=<font color="#ff40ff"><b>&quot;/atom:entry/*&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>15 </b></font>  <font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace&gt;</b></font>
<font color="#ffff00"><b>16 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- yeah, this atom:entry is no longer valid ..--</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>17 </b></font><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta&gt;</b></font>
</pre>
<h3>set-attribute</h3>
<pre>
<font color="#ffff00"><b> 1 </b></font>PATCH /collection/entry/1 HTTP/1.1
<font color="#ffff00"><b> 2 </b></font>Host: example.org
<font color="#ffff00"><b> 3 </b></font>Content-Type: application/delta+xml
<font color="#ffff00"><b> 4 </b></font>Content-Length: nnnn
<font color="#ffff00"><b> 5 </b></font>
<font color="#ffff00"><b> 6 </b></font><font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta</b></font>
<font color="#ffff00"><b> 7 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>d</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://purl.org/atompub/delta">http://purl.org/atompub/delta</a>&quot;</b></font>
<font color="#ffff00"><b> 8 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b> 9 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>atom</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b>10 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>b</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://example.org/foo">http://example.org/foo</a>&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>11 </b></font>
<font color="#ffff00"><b>12 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- substitute for set-attribute</b></font>
<font color="#ffff00"><b>13 </b></font><font color="#00ffff"><b>       /atom:entry/atom:link/@href </b></font>
<font color="#ffff00"><b>14 </b></font><font color="#00ffff"><b>       to <a href="http://not-example.org">http://not-example.org</a> --</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>15 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace</b></font><font color="#00ffff"><b> </b></font><font color="#00ff00"><b>path</b></font>=<font color="#ff40ff"><b>&quot;/atom:entry/atom:link/@href&quot;</b></font><font color="#00ffff"><b>&gt;</b></font><a href="http://not-example.org">http://not-example.org</a><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace&gt;</b></font>
<font color="#ffff00"><b>16 </b></font><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta&gt;</b></font>
</pre>
<h3>remove-attribute</h3>
<pre>
<font color="#ffff00"><b> 1 </b></font>PATCH /collection/entry/1 HTTP/1.1
<font color="#ffff00"><b> 2 </b></font>Host: example.org
<font color="#ffff00"><b> 3 </b></font>Content-Type: application/delta+xml
<font color="#ffff00"><b> 4 </b></font>Content-Length: nnnn
<font color="#ffff00"><b> 5 </b></font>
<font color="#ffff00"><b> 6 </b></font><font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta</b></font>
<font color="#ffff00"><b> 7 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>d</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://purl.org/atompub/delta">http://purl.org/atompub/delta</a>&quot;</b></font>
<font color="#ffff00"><b> 8 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b> 9 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>atom</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>&quot;</b></font>
<font color="#ffff00"><b>10 </b></font><font color="#00ffff"><b>  </b></font><font color="#00ff00"><b>xmlns</b></font><font color="#00ffff"><b>:</b></font><font color="#00ff00"><b>b</b></font>=<font color="#ff40ff"><b>&quot;<a href="http://example.org/foo">http://example.org/foo</a>&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>11 </b></font>
<font color="#ffff00"><b>12 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- substitute for remove-attribute</b></font>
<font color="#ffff00"><b>13 </b></font><font color="#00ffff"><b>       /atom:entry/atom:link/@href --</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>14 </b></font>  <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace</b></font><font color="#00ffff"><b> </b></font><font color="#00ff00"><b>path</b></font>=<font color="#ff40ff"><b>&quot;/atom:entry/atom:link&quot;</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>15 </b></font>    <font color="#00ffff"><b>&lt;</b></font><font color="#ff6060"><b>atom</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>link</b></font><font color="#00ffff"><b>/&gt;</b></font>
<font color="#ffff00"><b>16 </b></font>  <font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>replace&gt;</b></font>
<font color="#ffff00"><b>17 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- you can't take the easy way and match</b></font>
<font color="#ffff00"><b>18 </b></font><font color="#00ffff"><b>       the attribute, because an empty attribute</b></font>
<font color="#ffff00"><b>19 </b></font><font color="#00ffff"><b>       (@attr=&quot;&quot;) means something different than</b></font>
<font color="#ffff00"><b>20 </b></font><font color="#00ffff"><b>       the absence of @attr --</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>21 </b></font>  <font color="#00ffff"><b>&lt;!</b></font><font color="#00ffff"><b>-- and this atom:link is longer valid ..--</b></font><font color="#00ffff"><b>&gt;</b></font>
<font color="#ffff00"><b>22 </b></font><font color="#00ffff"><b>&lt;/</b></font><font color="#ff6060"><b>d</b></font><font color="#00ffff"><b>:</b></font><font color="#00ffff"><b>delta&gt;</b></font>
</pre>
<p>I think the above could be fairly easily implemented as a transformation into either XQuery or XSLT, but I&#8217;d imagine that it could be implemented using streaming techniques as well. Thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://kfahlgren.com/blog/2007/06/10/partial-updates-a-simpler-strawman/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Code Behind DocBook Elements in the Wild</title>
		<link>http://kfahlgren.com/blog/2007/05/01/the-code-behind-docbook-elements-in-the-wild/</link>
		<comments>http://kfahlgren.com/blog/2007/05/01/the-code-behind-docbook-elements-in-the-wild/#comments</comments>
		<pubDate>Wed, 02 May 2007 03:24:15 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[AtomPub]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[DocBook]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://kfahlgren.com/blog/2007/05/01/the-code-behind-docbook-elements-in-the-wild/</guid>
		<description><![CDATA[[UPDATE: Added a link to the categorized CSV file below]
Here&#8217;s some of the nitty-gritty behind DocBook Elements in the Wild. We&#8217;re trying to get a count of all of the element names in a set of 49 DocBook 4.4 &#60;book&#62;s.
First, go ask the O&#8217;Reilly product database for all the books that were sent to the [...]]]></description>
			<content:encoded><![CDATA[<p>[UPDATE: Added a link to the <a href="http://kfahlgren.com/docbook/49books_categorized.csv">categorized CSV</a> file below]</p>
<p>Here&#8217;s some of the nitty-gritty behind <a href="http://www.oreillynet.com/xml/blog/2007/05/docbook_elements_in_the_wild.html">DocBook Elements in the Wild</a>. We&#8217;re trying to get a count of all of the element names in a set of 49 DocBook 4.4 <tt>&lt;book&gt;</tt>s.</p>
<p>First, go ask the O&#8217;Reilly product database for all the books that were sent to the printer in 2006. Because I&#8217;m better at XML than Unix text tools, ask for <tt>mysql -X</tt>. Now we&#8217;ve got something like:</p>
<pre>&lt;resultset statement="select..."&gt;
 &lt;row&gt;
        &lt;field name="isbn13"&gt;9780596101619&lt;/field&gt;
        &lt;field name="title"&gt;Google Maps Hacks&lt;/field&gt;
        &lt;field name="edition"&gt;1&lt;/field&gt;
        &lt;field name="book_vendor_date"&gt;2006-01-05&lt;/field&gt;
  &lt;/row&gt;
  &lt;row&gt;
        &lt;field name="isbn13"&gt;9780596008796&lt;/field&gt;
        &lt;field name="title"&gt;Excel Scientific and Engineering Cookbook&lt;/field&gt;
        &lt;field name="edition"&gt;1&lt;/field&gt;
        &lt;field name="book_vendor_date"&gt;2006-01-06&lt;/field&gt;
  &lt;/row&gt;
  &lt;row&gt;
        &lt;field name="isbn13"&gt;9780596101732&lt;/field&gt;
        &lt;field name="title"&gt;Active Directory&lt;/field&gt;
        &lt;field name="edition"&gt;3&lt;/field&gt;
        &lt;field name="book_vendor_date"&gt;2006-01-06&lt;/field&gt;
  &lt;/row&gt;
  ...
</pre>
<p>Next, fun with <a href="http://xmlstar.sourceforge.net/">XMLStarlet</a>:</p>
<pre>$ xml sel -t -m "//field[@name='isbn13']" -v '.' -n books_in_2006.xml
9780596101619
9780596008796
9780596101732
9780596009441
...</pre>
<p>Now, pull the content down from our <a href="http://www.ietf.org/internet-drafts/draft-ietf-atompub-protocol-14.txt">Atom Publishing Protocol</a> repository and make a big document with XIncludes:</p>
<pre>#!/usr/bin/env ruby
require 'kurt'
require 'rexml/document'
OUTFILE = "aggregate.xml"
files_downloaded = []
ARGV.each {|atom_id|
  entry = Atom::Entry.get_entry("#{Kurt::PROD_RESOURCES}/#{CGI.escape(atom_id)}")
  filename = atom_id.gsub(/\W/, '') + ".xml"
  File.open(filename, "w") {|f|
    f.print entry.content
  }
  files_downloaded &lt;&lt; filename
}

agg = REXML::Document.new
agg.add_element("books")
agg.root.add_namespace("xi", "http://www.w3.org/2001/XInclude")
files_downloaded.each {|file|
  xi = agg.root.add_element("xi:include")
  xi.add_attribute("href", file)
}
File.open(OUTFILE, "w") {|f|
  agg.write(f, 2)
}</pre>
<p>Resolve all of the XIncludes into one big file:</p>
<pre>$ xmllint --xinclude -o aggregate.xml aggregate.xml </pre>
<p>It&#8217;s now pretty huge (well, huge in my world):</p>
<pre>$ du -h aggregate.xml
102M    aggregate.xml</pre>
<p>At this point, we&#8217;re ready to do the real counting of the elements (slow REXML solution commented out in favor of a <a href="http://libxml.rubyforge.org/doc/">libxml</a>-based solution):</p>
<pre>#!/usr/bin/env ruby
require 'rexml/parsers/pullparser'
require 'rubygems'
require 'xml/libxml'
start = Time.now
ARGV.each {|filename|
  counts = Hash.new
#  parser = REXML::Parsers::PullParser.new(File.new(filename))
#  while parser.has_next?
#    el = parser.pull
#    if el.start_element?
#      element_name = el[0]
#      if counts[element_name]
#        counts[element_name] += 1
#      else
#        counts[element_name] = 1
#      end
#    end
#  end
  parser = XML::SaxParser.new
  parser.filename = filename
  parser.on_start_element {|element_name, _|
    if counts[element_name]
      counts[element_name] += 1
    else
      counts[element_name] = 1
    end
  }
  parser.parse

  File.open(filename + ".count.csv", "w") {|f|
    counts.each {|element_name, count|
      f.puts "\"#{element_name}\",#{count}"
    }
  }
}
</pre>
<p>(Hooray for steam parsing, as this 100MB file was cranked through in 27 seconds on a 700MHz box!)</p>
<p>Finally, we&#8217;ve got CSV and we can do some graphing. <a href="http://kfahlgren.com/docbook/49books.csv">Here&#8217;s the full CSV</a> and the <a href="http://kfahlgren.com/docbook/49books_categorized.csv">categorized CSV</a>. Rather than working on a code-based graphing solution, I just messed with Excel. The result:</p>
<p><a href="http://www.oreillynet.com/xml/blog/images/elements_in_49_books.png"><img src="http://www.oreillynet.com/xml/blog/images/elements_in_49_books.png" alt="DocBook Elements from 49 Books" /></a></p>
<p>Here&#8217;s my favorite, a drill-down based on a categorization I just made up (click through for the drill-down):</p>
<p><a href="http://kfahlgren.com/photos/docbook/49booksmap.html"><img src="http://kfahlgren.com/photos/docbook/elements_in_49_books_categorized.png" alt="DocBook Elements from 49 Books, Categorized" /></a></p>
<p>Books used:</p>
<ul>
<li><a href="http://www.oreilly.com/catalog/googlemapshks/">Google Maps Hacks, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/excelseckbk/">Excel Scientific and Engineering Cookbook, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/actdir3/">Active Directory, 3e</a></li>
<li><a href="http://www.oreilly.com/catalog/rfid/">RFID Essentials, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/vb2005ian3/">Visual Basic 2005 in a Nutshell, 3e</a></li>
<li><a href="http://www.oreilly.com/catalog/psphks/">PSP Hacks, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/baseballhks/">Baseball Hacks, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/mindperfhks/">Mind Performance Hacks, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/repairpc/">Repairing and Upgrading Your PC, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/websiteckbk/">Web Site Cookbook, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/flickrhks/">Flickr Hacks, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/accessannoy/">Fixing Access Annoyances, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/powerpointannoy/">Fixing PowerPoint Annoyances, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/progsqlsvr/">Programming SQL Server 2005, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/learncsharp2/">Learning C# 2005, 2e</a></li>
<li><a href="http://www.oreilly.com/catalog/photoshopraw/">Photoshop CS2 RAW, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/wdnut3/">Web Design in a Nutshell, 3e</a></li>
<li><a href="http://www.oreilly.com/catalog/googletmm2/">Google: The Missing Manual, 2e</a></li>
<li><a href="http://www.oreilly.com/catalog/dgbebay/">Don&#8217;t Get Burned on eBay, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/artofsql/">The Art of SQL, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/windowsxpannoy/">Fixing Windows XP Annoyances, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/iphotomm/">iPhoto 6: The Missing Manual, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/ipodtmm4/">iPod &#038; iTunes: The Missing Manual, 4e</a></li>
<li><a href="http://www.oreilly.com/catalog/ajaxhks/">Ajax Hacks, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/flash8tmm/">Flash 8: The Missing Manual, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/mysqlspp/">MySQL Stored Procedure Programming, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/flashprojects/">Flash 8: Projects for Learning Animation and Interactivity, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/xamlian/">XAML in a Nutshell, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/linuxannoygks/">Linux Annoyances for Geeks, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/progphp2/">Programming PHP, 2e</a></li>
<li><a href="http://www.oreilly.com/catalog/flash8ckbk/">Flash 8 Cookbook, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/learnsqlsvr05/">Learning SQL on SQL Server 2005, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/progexcel/">Programming Excel with VBA and .NET, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/imovie06tmm/">iMovie 6 &#038; iDVD: The Missing Manual, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/enterprisesa/">Enterprise SOA, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/perlhks/">Perl Hacks, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/javaio2/">Java I/O, 2e</a></li>
<li><a href="http://www.oreilly.com/catalog/entjbeans5/">Enterprise JavaBeans 3.0, 5e</a></li>
<li><a href="http://www.oreilly.com/catalog/web2apps/">Building Scalable Web Sites, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/mcsecoreian/">MCSE Core Required Exams in a Nutshell, 3e</a></li>
<li><a href="http://www.oreilly.com/catalog/dns5/">DNS and BIND, 5e</a></li>
<li><a href="http://www.oreilly.com/catalog/learnphpmysql/">Learning PHP and MySQL, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/csb2/">Computer Security Basics, 2e</a></li>
<li><a href="http://www.oreilly.com/catalog/activedckbk2/">Active Directory Cookbook, 2e</a></li>
<li><a href="http://www.oreilly.com/catalog/ubuntuhks/">Ubuntu Hacks, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/unicode/">Unicode Explained, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/digphototmm/">Digital Photography: The Missing Manual, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/ajaxdp/">Ajax Design Patterns, 1e</a></li>
<li><a href="http://www.oreilly.com/catalog/pythonian2/">Python in a Nutshell, 2e</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kfahlgren.com/blog/2007/05/01/the-code-behind-docbook-elements-in-the-wild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>APP Interop Pictures</title>
		<link>http://kfahlgren.com/blog/2007/04/17/app-interop-pictures/</link>
		<comments>http://kfahlgren.com/blog/2007/04/17/app-interop-pictures/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 03:55:03 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[AtomPub]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://kfahlgren.com/blog/2007/04/17/app-interop-pictures/</guid>
		<description><![CDATA[I took a couple of quick shots of the group:

and the grid:

More details on my xml.com blog post.
Tim Bray has better photos here.
]]></description>
			<content:encoded><![CDATA[<p>I took a couple of quick shots of the group:</p>
<p><a href="http://kfahlgren.com/photos/app-inerop.jpg"><img src="http://kfahlgren.com/photos/app-inerop.jpg" alt="The assembled crowd at the APP interop" /></a></p>
<p>and <a href="http://www.intertwingly.net/wiki/pie/InteropGrid">the grid</a>:</p>
<p><a href="http://kfahlgren.com/photos/app-inerop-grid.jpg"><img src="http://kfahlgren.com/photos/app-inerop-grid.jpg" alt="The interop grid at the APP interop" /></a></p>
<p>More details on <a href="http://www.oreillynet.com/xml/blog/2007/04/atom_publishing_protocol_inter.html">my xml.com blog post</a>.</p>
<p>Tim Bray has better photos <a href="http://www.tbray.org/ongoing/When/200x/2007/04/16/Interop">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kfahlgren.com/blog/2007/04/17/app-interop-pictures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby and the Atom Publishing Protocol</title>
		<link>http://kfahlgren.com/blog/2007/02/24/ruby-and-the-atom-publishing-protocol/</link>
		<comments>http://kfahlgren.com/blog/2007/02/24/ruby-and-the-atom-publishing-protocol/#comments</comments>
		<pubDate>Sat, 24 Feb 2007 15:53:40 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[AtomPub]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[nbrug]]></category>

		<guid isPermaLink="false">http://kfahlgren.com/blog/?p=38</guid>
		<description><![CDATA[I gave a short talk at the first North Bay Ruby Users Group last Thursday (Feb 15, 2007) about my recent work implementing an Atom Publishing Protocol library in Ruby. Here&#8217;s the presentation:

]]></description>
			<content:encoded><![CDATA[<p>I gave a short talk at the first <a href="http://nbrug.com">North Bay Ruby Users Group</a> last Thursday (Feb 15, 2007) about my recent work implementing an <a href="http://ietfreport.isoc.org/idref/draft-ietf-atompub-protocol/">Atom Publishing Protocol</a> library in Ruby. Here&#8217;s the presentation:</p>
<p><a href="http://kfahlgren.com/talks/ruby_app.pdf"><img src="http://kfahlgren.com/talks/ruby_app.thumb.png" alt="Thumbnail of my Ruby APP talk" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://kfahlgren.com/blog/2007/02/24/ruby-and-the-atom-publishing-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
