<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEcHQHc9fSp7ImA9WxBUE0o.&quot;"><id>tag:blogger.com,1999:blog-14372968</id><updated>2010-02-28T10:53:51.965-06:00</updated><title>Words in Boxes</title><subtitle type="html">Nouns, verbs, and occasionally adjectives.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.wordsinboxes.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.wordsinboxes.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>166</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/IndigoFlats" /><feedburner:info uri="indigoflats" /><entry gd:etag="W/&quot;D0ENRXk9cSp7ImA9WxBUE0o.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-1596252168366768209</id><published>2010-02-28T10:48:00.001-06:00</published><updated>2010-02-28T10:48:14.769-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-28T10:48:14.769-06:00</app:edited><title>George Orwell on Writing and Thinking</title><content type="html">&lt;p&gt;From &lt;a href="http://www.orwell.ru/library/essays/politics/english/e_polit"&gt;&lt;em&gt;Politics and the English Language&lt;/em&gt;&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;A scrupulous writer, in every sentence that he writes, will ask himself at least four questions, thus: 1. What am I trying to say? 2. What words will express it? 3. What image or idiom will make it clearer? 4. Is this image fresh enough to have an effect? And he will probably ask himself two more: 1. Could I put it more shortly? 2. Have I said anything that is avoidably ugly? But you are not obliged to go to all this trouble. You can shirk it by simply throwing your mind open and letting the ready-made phrases come crowding in. They will construct your sentences for you – even think your thoughts for you, to a certain extent – and at need they will perform the important service of partially concealing your meaning even from yourself. &lt;/p&gt;    &lt;p&gt;… &lt;/p&gt;    &lt;p&gt;What is above all needed is to let the meaning choose the word, and not the other way around. In prose, the worst thing one can do with words is surrender to them. When you think of a concrete object, you think wordlessly, and then, if you want to describe the thing you have been visualizing you probably hunt about until you find the exact words that seem to fit it. When you think of something abstract you are more inclined to use words from the start, and unless you make a conscious effort to prevent it, the existing dialect will come rushing in and do the job for you, at the expense of blurring or even changing your meaning. Probably it is better to put off using words as long as possible and get one's meaning as clear as one can through pictures and sensations. Afterward one can choose -- not simply accept -- the phrases that will best cover the meaning, and then switch round and decide what impressions one's words are likely to make on another person. This last effort of the mind cuts out all stale or mixed images, all prefabricated phrases, needless repetitions, and humbug and vagueness generally. But one can often be in doubt about the effect of a word or a phrase, and one needs rules that one can rely on when instinct fails. I think the following rules will cover most cases: &lt;/p&gt;    &lt;p&gt;(i) Never use a metaphor, simile, or other figure of speech which you are used to seeing in print. &lt;/p&gt;    &lt;p&gt;(ii) Never us a long word where a short one will do. &lt;/p&gt;    &lt;p&gt;(iii) If it is possible to cut a word out, always cut it out. &lt;/p&gt;    &lt;p&gt;(iv) Never use the passive where you can use the active. &lt;/p&gt;    &lt;p&gt;(v) Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent. &lt;/p&gt;    &lt;p&gt;(vi) Break any of these rules sooner than say anything outright barbarous. &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Worth rereading every once and a while.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-1596252168366768209?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/V21eac_UKk4" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/1596252168366768209?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/1596252168366768209?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/V21eac_UKk4/george-orwell-on-writing-and-thinking.html" title="George Orwell on Writing and Thinking" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2010/02/george-orwell-on-writing-and-thinking.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcASX0yeSp7ImA9WxBWFUo.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-3679382033899017814</id><published>2010-02-07T13:14:00.001-06:00</published><updated>2010-02-07T13:14:08.391-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-07T13:14:08.391-06:00</app:edited><title>Switcheroo version 0.4</title><content type="html">&lt;p&gt;I’ve released a &lt;a href="http://bitbucket.org/jasulak/switcheroo/wiki/Home"&gt;new version of Switcheroo&lt;/a&gt;, the humble incremental-search task switcher for Windows.&amp;#160; Changes in this version include:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The list that prevents certain windows from appearing in the main window is now editable from the options dialog.&amp;#160; (For example, “Program Manager.”) &lt;/li&gt;    &lt;li&gt;The main window now resizes to the full width and height of the list. &lt;/li&gt;    &lt;li&gt;Fixed a few minor bugs and tested on 32-bit Windows 7. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_RxnSdqnpnDs/S28Q_I-YaOI/AAAAAAAAA3Q/POcAW-HUXvU/s1600-h/screenshot%5B4%5D.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="screenshot" border="0" alt="screenshot" src="http://lh6.ggpht.com/_RxnSdqnpnDs/S28Q_xmbDsI/AAAAAAAAA3U/C7BqB_XqXpc/screenshot_thumb%5B2%5D.png?imgmax=800" width="392" height="176" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-3679382033899017814?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/wvqaz64f0xk" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/3679382033899017814?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/3679382033899017814?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/wvqaz64f0xk/switcheroo-version-04.html" title="Switcheroo version 0.4" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2010/02/switcheroo-version-04.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUERHYzfyp7ImA9WxBXFU0.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-7159263194079331209</id><published>2010-01-26T06:00:00.000-06:00</published><updated>2010-01-26T06:00:05.887-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-26T06:00:05.887-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="utilities" /><title>Essential Windows Tools</title><content type="html">&lt;p&gt;When working, I like everything on my computer “just so.”&amp;#160; I want to do things quickly and with minimal mental overhead.&amp;#160; Here’s a list of (developer-centric) tools that make that possible:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;&lt;a href="http://virtuawin.sourceforge.net/"&gt;VirtuaWin&lt;/a&gt;&lt;/strong&gt;. This is hands-down the best &lt;a href="http://en.wikipedia.org/wiki/Virtual_desktop"&gt;virtual desktop&lt;/a&gt; manager for windows.&amp;#160; With a bit of tweaking, you can switch between desktops instantaneously by bumping your mouse pointer at the edge of the screen while holding down the control key.&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.zabkat.com/"&gt;&lt;strong&gt;xplorer2&lt;/strong&gt;&lt;/a&gt;. I use the free “&lt;a href="http://www.zabkat.com/x2lite.htm"&gt;lite&lt;/a&gt;” version.&amp;#160; Great features:&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Tabbed views (just like your browser).&amp;#160; Keeps the taskbar clean.&lt;/li&gt;      &lt;li&gt;Filter a directory listing quickly using ctrl-h.&amp;#160; &lt;/li&gt;      &lt;li&gt;When in a folder, pressing F10 and enter starts a command prompt in that folder.&amp;#160; (With a bit more tweaking, get a cygwin bash prompt.)&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;a href="http://www.cygwin.com/"&gt;&lt;strong&gt;Cygwin + minTTY&lt;/strong&gt;&lt;/a&gt;.&amp;#160; If you spend time on the command prompt, it’s worth it to learn your way around bash.&amp;#160; And MinTTY’s native-windows interface – with fully resizable windows and transparency – is worth the price of admission alone.&amp;#160; I don’t use the built-in command prompt any more, and neither should you. Great features:&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Color coded directory listings and grep results.&amp;#160; &lt;/li&gt;      &lt;li&gt;Press control-r and search backwards through your command history. &lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;a href="http://bitbucket.org/jasulak/switcheroo/wiki/Home"&gt;&lt;strong&gt;Switcheroo&lt;/strong&gt;&lt;/a&gt;. Yes, I wrote it, but what of it?&amp;#160; Switching between (and closing) running applications using incremental search keeps me from reaching for the mouse and breaking my concentration. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.bayden.com/SlickRun/"&gt;&lt;strong&gt;Slickrun&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&amp;#160; A floating, auto-completing prompt that lets you quickly open programs, folders, and websites.&amp;#160; With some batch-script ingenuity, the possibilities are endless.&amp;#160; For example, I can type “vup” or “vdown” to quickly adjust the volume.&amp;#160; Or “newmail” to write a new e-mail in Outlook.&amp;#160; For most commands, I only have to type the first few letters. Set up tip: change the colors, make the font larger, and set it to autohide and chase your mouse cursor.&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.gnu.org/software/emacs/"&gt;&lt;strong&gt;Emacs&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; The One True Editor.&amp;#160; Learning it is a commitment, but worth it.&amp;#160; If you take the plunge, grab &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897578.aspx"&gt;Ctrl2Cap&lt;/a&gt; and remap your caps lock key as another control key.&amp;#160; With a bit of setup, plays very well with Cygwin.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.winsplit-revolution.com/"&gt;&lt;strong&gt;Winsplit Revolution&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&amp;#160; Not as essential with Windows 7’s built-in window positioning, but the fusion mode is still great.&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://passwordsafe.sourceforge.net/"&gt;&lt;strong&gt;Password Safe&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&amp;#160; Securely encrypt a list of all your passwords.&amp;#160; Now you only have to remember one, which lets you online banking passwords more complex and harder to brute-force.&amp;#160; And you’ll stop using the same one everywhere.&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-7159263194079331209?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/mPbYn0h8Idg" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/7159263194079331209?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/7159263194079331209?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/mPbYn0h8Idg/essential-windows-tools.html" title="Essential Windows Tools" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2010/01/essential-windows-tools.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YEQ308eCp7ImA9WxBXEUs.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-3140334346609202719</id><published>2010-01-22T08:05:00.001-06:00</published><updated>2010-01-22T08:05:02.370-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-22T08:05:02.370-06:00</app:edited><title>Knowledge and productivity are like compound interest</title><content type="html">&lt;blockquote&gt;   &lt;p&gt;What Bode was saying was this: ``Knowledge and productivity are like compound interest.'' Given two people of approximately the same ability and one person who works ten percent more than the other, the latter will more than twice outproduce the former. The more you know, the more you learn; the more you learn, the more you can do; the more you can do, the more the opportunity - it is very much like compound interest. I don't want to give you a rate, but it is a very high rate. Given two people with exactly the same ability, the one person who manages day in and day out to get in one more hour of thinking will be tremendously more productive over a lifetime.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#8211; Richard Hammin, in &lt;em&gt;&lt;a href="http://www.cs.virginia.edu/~robins/YouAndYourResearch.html"&gt;You and Your Research&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-3140334346609202719?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/t0iS3JCUhAs" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/3140334346609202719?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/3140334346609202719?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/t0iS3JCUhAs/knowledge-and-productivity-are-like.html" title="Knowledge and productivity are like compound interest" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2010/01/knowledge-and-productivity-are-like.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8EQ3oyfip7ImA9WxNUEU8.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-3644458274866662298</id><published>2009-11-01T20:26:00.001-06:00</published><updated>2009-11-01T20:26:42.496-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-01T20:26:42.496-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="projects" /><category scheme="http://www.blogger.com/atom/ns#" term="exist-db" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="xproc" /><category scheme="http://www.blogger.com/atom/ns#" term="Switcheroo" /><title>Recent Projects</title><content type="html">&lt;p&gt;It's been a while since I've written here.&amp;nbsp; In the interim, I've completed a few different small projects.&amp;nbsp; Here they are in no particular order:&lt;/p&gt; &lt;ul&gt; &lt;li&gt; &lt;p&gt;&lt;a href="http://bitbucket.org/jasulak/switcheroo"&gt;Switcheroo&lt;/a&gt;.&amp;nbsp; The humble incremental-search task switcher for Windows.&lt;/p&gt; &lt;p&gt;I wrote this partly to learn a bit of WPF, and partly to scratch my own itch. I got tired of alt-tabbing through a (long) list of open windows, and really wanted something like Emacs's IDO mode buffer switching.&amp;nbsp; This little program allows me to quickly switch to any window by typing in just a few characters of its title. &lt;/p&gt; &lt;li&gt; &lt;p&gt;&lt;a href="http://bitbucket.org/jasulak/exist-xproc-library/"&gt;eXist XProc Extension Library&lt;/a&gt;.&amp;nbsp; A set of XProc extension steps for interacting with an eXist XML database from a client. Using these steps, you can conduct common eXist management tasks from XProc - loading resources, extracting resources, querying data, etc. They fill much the same role as the eXist Ant tasks.&lt;/p&gt; &lt;p&gt;I wrote it as an experiment in creating a non-trivial reusable library in pure XProc.&amp;nbsp; I think it came out fairly well.&amp;nbsp; &lt;/p&gt; &lt;li&gt; &lt;p&gt;&lt;a href="http://bitbucket.org/jasulak/ruby-blue-visual-studio-theme"&gt;Ruby Blue Visual Studio theme&lt;/a&gt;.&amp;nbsp; I really liked the various ruby blue themes available for other editors and wanted one for Visual Studio.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-3644458274866662298?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/bsox15xHUJ0" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/3644458274866662298?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/3644458274866662298?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/bsox15xHUJ0/recent-projects.html" title="Recent Projects" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2009/11/recent-projects.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEGRnc5fyp7ImA9WxJQE0U.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-7138620877934548552</id><published>2009-05-26T20:43:00.001-05:00</published><updated>2009-05-26T20:43:47.927-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-26T20:43:47.927-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="xproc" /><title>XProc Roundup</title><content type="html">&lt;a href="http://www.flickr.com/photos/st3f4n/1419405808/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="1419405808_7dff1fea23_m" src="http://lh3.ggpht.com/_RxnSdqnpnDs/Shya037r_8I/AAAAAAAAAxs/Q944uulLNZI/1419405808_7dff1fea23_m%5B5%5D.jpg?imgmax=800" width="184" align="right" border="0"&gt;&lt;/a&gt;  &lt;p&gt;Interest in XProc has really picked up recently, which is exciting to see.&amp;nbsp; Here's a roundup of some of the recent activity: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="https://community.emc.com/docs/DOC-3337"&gt;XProc: Step by Step&lt;/a&gt;. Vojtech Toman (who's working on EMC's Calumet implementation) wrote a great introduction to XProc.&amp;nbsp; Calumet itself is scheduled to be released under a developer's license on &lt;a href="https://community.emc.com/docs/DOC-3139"&gt;June 15&lt;/a&gt;.&amp;nbsp; I don't use any of EMC's products, but it's encouraging that such a big player in the market is embracing XProc.  &lt;li&gt;&lt;a href="http://www.xfront.com/xproc/"&gt;XProc Tutorial&lt;/a&gt;.&amp;nbsp; Roger Costello updated his excellent tutorial.&amp;nbsp; It's a bit of a shame that it's in PowerPoint, but it's well organized and comes with several sample scripts.  &lt;li&gt;&lt;a href="http://efasoft.blogspot.com/2009/05/why-xproc-rocks.html"&gt;Why XProc Rocks&lt;/a&gt;.&amp;nbsp; Joel Amoussou talks about XProc and news publishing.  &lt;li&gt;&lt;a href="http://plindenbaum.blogspot.com/2009/05/xml-pipelines-xproc-for-bioinformatics.html"&gt;XML Pipelines / XProc for bioinformatics&lt;/a&gt;. Pierre Lindenbaum describes an interesting use of XProc.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The XProc spec is tantalizingly close to making the transition to proposed recommendation, and all the recent (and positive) attention makes me optimistic that XProc will be a standard that's actually &lt;em&gt;used&lt;/em&gt; in the real world.&amp;nbsp; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-7138620877934548552?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/naHzXayEUm8" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/7138620877934548552?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/7138620877934548552?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/naHzXayEUm8/xproc-roundup.html" title="XProc Roundup" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2009/05/xproc-roundup.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcDQngzeip7ImA9WxVUEks.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-8227232940694569293</id><published>2009-03-16T22:21:00.001-05:00</published><updated>2009-03-16T22:21:13.682-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-16T22:21:13.682-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="testing" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="xproc" /><category scheme="http://www.blogger.com/atom/ns#" term="XSLT" /><title>Debugging XProc Pipelines</title><content type="html">&lt;p&gt;As I've worked more with XProc, I've written a couple of utility steps to help debug pipelines.&amp;nbsp; Although they started as quick hacks, they've continued helping out long enough to be worth sharing.&amp;nbsp; You can download the library &lt;a href="http://dl.getdropbox.com/u/410195/debug.xpl"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The more interesting of those is a step (wxp:assert) which asserts that the result of a given XPath expression evaluated against one document must be equal that that of a second XPath evaluated against a second document.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Practically speaking, I can assert that the output from a step must match certain expectations.&amp;nbsp; If this assertion is met, the wxp:assert step functions just like a p:identity step, passing XML through its primary input to its primary output without modification.&amp;nbsp; If the assertion fails, the step sends an error message to the console, and optionally throws an XProc error and terminates pipeline execution.&amp;nbsp; &lt;/p&gt; &lt;p&gt;For example, here's an excerpt from an upconversion pipeline:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;group-sections&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;stylesheet&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:document &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;group-sections.xslt&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;

&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;wxp:debug-output &lt;/span&gt;&lt;span style="color: red"&gt;step-name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;6-sections-grouped&lt;/span&gt;" &lt;span style="color: red"&gt;debug&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;

&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;wxp:assert &lt;/span&gt;&lt;span style="color: red"&gt;label&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;No sections were deleted during grouping&lt;/span&gt;" 
            &lt;span style="color: red"&gt;xpath-source&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;count(.//subsection)&lt;/span&gt;"
            &lt;span style="color: red"&gt;xpath-alternate&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;count(.//*[self::sect-1 | self::sect-2 | 
                             self::sect-3 | self::sect-4])&lt;/span&gt;" 
            &lt;span style="color: red"&gt;fail-on-error&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;false&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;alternate&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipe &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;result&lt;/span&gt;" 
            &lt;span style="color: red"&gt;step&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parse-initial-subsections&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;wxp:assert&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;

&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;(This also shows the wxp:debug-output step, which has probably been rendered obsolete by the latest version of Calabash.&amp;nbsp; It simply functions as a p:identity step that also writes the XML it receives to disk for later review.)&lt;/p&gt;
&lt;p&gt;This instance of wxp:assert asserts that the number of subsection elements in the primary &lt;em&gt;source &lt;/em&gt;input port matches the number of sect-1 and sect-2 elements on the &lt;em&gt;alternate&lt;/em&gt; input port.&amp;nbsp; The &lt;em&gt;source&lt;/em&gt; document is produced by the preceding step, and the &lt;em&gt;alternate&lt;/em&gt; document is piped in from a step earlier in the pipeline.&amp;nbsp; This is a quick way to ensure I don't do anything too lame-brained in the "group sections" step.&lt;/p&gt;
&lt;p&gt;Here's another instance from the same upconversion pipeline.&amp;nbsp; This tests the output from a XSLT step that uses regular expressions to parse out section numbers from title elements. &lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;wxp:assert &lt;/span&gt;&lt;span style="color: red"&gt;label&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;No empty enums after parsing sections&lt;/span&gt;"
    &lt;span style="color: red"&gt;xpath-source&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;count(.//enum[not(.//text()[string-length(normalize-space(.)) gt 0])])&lt;/span&gt;" 
    &lt;span style="color: red"&gt;xpath-alternate&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;0&lt;/span&gt;"
    &lt;span style="color: red"&gt;fail-on-error&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;In this case, the &lt;em&gt;alternate&lt;/em&gt; XPath expression is a constant (0), so I don't need to provide a document on the &lt;em&gt;alternate&lt;/em&gt; port.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Using wxp:assert steps does slow down a pipline, so I usually remove them once I finish debugging the pipeline.&amp;nbsp; The major exception to this rule is that I leave them active in upconversion pipelines where manual intervention is acceptable and accuracy is more important than speed.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;There are a few interesting in the step's &lt;a href="http://dl.getdropbox.com/u/410195/debug.xpl"&gt;source&lt;/a&gt; worth checking out.&amp;nbsp; Here's a summary of how wxp:assert works:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It combines the two source documents into a single document using p:pack. &lt;/li&gt;
&lt;li&gt;That is passed to an XSL stylesheet, which uses the saxon:evaluate extension function to evalutate the two XPaths against their respective nodesets.&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Depending on the value of the fail-on-error option, throw an XProc error and terminate the pipeline.&lt;/li&gt;
&lt;li&gt;Use a final p:identity step to pipe the initial input from the step's &lt;em&gt;source&lt;/em&gt; port to its &lt;em&gt;result&lt;/em&gt; port.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Or course, using a Saxon extension function does tie the pipeline to Calabash (or at least, a Saxon-based processor). I'm interested in hearing ideas about alternate approaches. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-8227232940694569293?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/PMSBVabIqes" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/8227232940694569293?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/8227232940694569293?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/PMSBVabIqes/debugging-xproc-pipelines.html" title="Debugging XProc Pipelines" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2009/03/debugging-xproc-pipelines.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEAQ3ozfSp7ImA9WxVXE0Q.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-1715262195865978774</id><published>2009-02-11T18:25:00.003-06:00</published><updated>2009-02-11T18:30:42.485-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-11T18:30:42.485-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XSpec" /><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="XSLT" /><title>Code Review:  Commenting XSLT Regular Expressions</title><content type="html">&lt;p&gt;You learn a lot from reading other people's code.&amp;#160; For example, the other day I ran into a &lt;a href="http://code.google.com/p/xspec/source/browse/trunk/coverage-report.xsl?spec=svn35&amp;amp;r=35"&gt;clever trick&lt;/a&gt; in Jeni Tennison's &lt;a href="http://code.google.com/p/xspec/"&gt;XSpec&lt;/a&gt; code for commenting regular expressions in XSLT: &lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style=" color: #a31515"&gt;xsl:variable &lt;/span&gt;&lt;span style=" color: red"&gt;name&lt;/span&gt;&lt;span style=" color: blue"&gt;=&lt;/span&gt;&lt;span &gt;&amp;quot;&lt;/span&gt;&lt;span style=" color: blue"&gt;attribute-regex&lt;/span&gt;&lt;span &gt;&amp;quot; &lt;/span&gt;&lt;span style=" color: red"&gt;as&lt;/span&gt;&lt;span style=" color: blue"&gt;=&lt;/span&gt;&lt;span &gt;&amp;quot;&lt;/span&gt;&lt;span style=" color: blue"&gt;xs:string&lt;/span&gt;&lt;span &gt;&amp;quot;&lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style=" color: #a31515"&gt;xsl:value-of&lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;gt;
    &lt;/span&gt;&lt;span &gt;\s+
    (\S+)        &lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style=" color: green"&gt;1: the name of the attribute &lt;/span&gt;&lt;span style=" color: blue"&gt;--&amp;gt;
    &lt;/span&gt;&lt;span &gt;\s*
    =
    \s*
    (       &lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style=" color: green"&gt;2: the value of the attribute (with quotes) &lt;/span&gt;&lt;span style=" color: blue"&gt;--&amp;gt;
      &lt;/span&gt;&lt;span &gt;&amp;quot;([^&amp;quot;]*)&amp;quot;  &lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style=" color: green"&gt;3: the value without quotes &lt;/span&gt;&lt;span style=" color: blue"&gt;--&amp;gt;
      &lt;/span&gt;&lt;span &gt;|
      '([^']*)'  &lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style=" color: green"&gt;4: also the value without quotes &lt;/span&gt;&lt;span style=" color: blue"&gt;--&amp;gt;
    &lt;/span&gt;&lt;span &gt;)
  &lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style=" color: #a31515"&gt;xsl:value-of&lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style=" color: #a31515"&gt;xsl:variable&lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;The trick is the &amp;lt;xsl:value-of /&amp;gt; instruction, which casts its contents as a string.&amp;#160; An especially nice thing about this method is that you can refer to other variables within the declaration:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span &gt;   (\S+)    &lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style=" color: green"&gt;12: the name of the element being opened &lt;/span&gt;&lt;span style=" color: blue"&gt;--&amp;gt;
   &lt;/span&gt;&lt;span &gt;(        &lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style=" color: green"&gt;13: the attributes of the element &lt;/span&gt;&lt;span style=" color: blue"&gt;--&amp;gt;
     &lt;/span&gt;&lt;span &gt;(      &lt;/span&gt;&lt;span style=" color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style=" color: green"&gt;14: wrapper for the attribute regex &lt;/span&gt;&lt;span style=" color: blue"&gt;--&amp;gt;
       &amp;lt;&lt;/span&gt;&lt;span style=" color: #a31515"&gt;xsl:value-of &lt;/span&gt;&lt;span style=" color: red"&gt;select&lt;/span&gt;&lt;span style=" color: blue"&gt;=&lt;/span&gt;&lt;span &gt;&amp;quot;&lt;/span&gt;&lt;span style=" color: blue"&gt;$attribute-regex&lt;/span&gt;&lt;span &gt;&amp;quot; &lt;/span&gt;&lt;span style=" color: blue"&gt;/&amp;gt;  &amp;lt;!-- &lt;/span&gt;&lt;span style=" color: green"&gt;15-18 attribute stuff &lt;/span&gt;&lt;span style=" color: blue"&gt;--&amp;gt;
     &lt;/span&gt;&lt;span &gt;)*
   )&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Of course, to ignore all the extra white space in a regex constructed this way, you'll need to set the &amp;quot;x&amp;quot; &lt;a href="http://www.w3.org/TR/xpath-functions/#regex-syntax"&gt;flag&lt;/a&gt; in any &amp;lt;xsl:analyze-string /&amp;gt;, replace(), or matches() that refers to it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-1715262195865978774?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/0gWAY38cPxk" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/1715262195865978774?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/1715262195865978774?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/0gWAY38cPxk/code-review-commenting-xslt-regular.html" title="Code Review:  Commenting XSLT Regular Expressions" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2009/02/code-review-commenting-xslt-regular.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAARn4yeSp7ImA9WxVQF0Q.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-7464698624766258441</id><published>2009-02-04T19:35:00.001-06:00</published><updated>2009-02-04T19:35:47.091-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-04T19:35:47.091-06:00</app:edited><title>“Broken gets fixed. Shoddy lasts forever”</title><content type="html">&lt;p&gt;&lt;a href="http://designaday.tumblr.com/post/75496791/truism"&gt;Jack Moffett&lt;/a&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;One of the developers I work with said this after I complained about a lingering issue in one of our products. It rings true. When deadlines are tight, and there is more work to get done than there are developers or hours in the schedule, it’s not the squeaky wheel, but the jammed one that gets the grease. The lesson, then, is to make sure it gets done right the first time. You never know when you’ll have the opportunity to revisit it.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;(via &lt;a href="http://daringfireball.net/linked/2009/02/04/broken-shoddy"&gt;Daring Fireball&lt;/a&gt;)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-7464698624766258441?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/aFeKTAD31Rw" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/7464698624766258441?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/7464698624766258441?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/aFeKTAD31Rw/broken-gets-fixed-shoddy-lasts-forever.html" title="“Broken gets fixed. Shoddy lasts forever”" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2009/02/broken-gets-fixed-shoddy-lasts-forever.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUBRnw7cSp7ImA9WxVRFU0.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-4250177642802158677</id><published>2009-01-20T21:07:00.001-06:00</published><updated>2009-01-20T21:07:37.209-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-20T21:07:37.209-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Alan Kay" /><title>Stark and Adjustable Meanings</title><content type="html">&lt;p&gt;An interview of &lt;a href="http://queue.acm.org/detail.cfm?id=1039523"&gt;Alan Kay&lt;/a&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;But at PARC our idea was, since you never step in the same river twice, the number-one thing you want to make the user interface be is a learning environment—something that’s explorable in various ways, something that is going to change over the lifetime of the user using this environment. New things are going to come on, and what does it mean for those new things to happen? &lt;p&gt;... Even if the user is an absolute expert, able to remember almost everything, I’m always interested in the difference between what you might call stark meaning and adjustable meaning. &lt;p&gt;I did quite a bit of study on that over the years to understand the influence of having something that you can read. It’s known that our basic language mechanism for both reading and hearing has a fast and a slow process. The fast process has basically a surface phrasal-size nature, and then there’s a slower one. This is why jokes require pauses; the joke is actually a jump from one context to another, and the slower guy, who is dealing with the real meanings, has to catch up to it. &lt;p&gt;There have been many, many studies of this. This argues that the surface form of a language, whatever it is, has to be adjustable in some form.&lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-4250177642802158677?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/ld_c3GMIhSk" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4250177642802158677?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4250177642802158677?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/ld_c3GMIhSk/stark-and-adjustable-meanings.html" title="Stark and Adjustable Meanings" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2009/01/stark-and-adjustable-meanings.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYBRn85fCp7ImA9WxVSFkQ.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-4522880298398231011</id><published>2009-01-11T10:09:00.001-06:00</published><updated>2009-01-11T10:09:17.124-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-11T10:09:17.124-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tim O'Reilly" /><category scheme="http://www.blogger.com/atom/ns#" term="business" /><title>Money Is Gas in the Car</title><content type="html">&lt;p&gt;&lt;a href="http://radar.oreilly.com/2009/01/work-on-stuff-that-matters-fir.html"&gt;Tim O'Reilly talks about the importance of working on things that are important&lt;/a&gt;, not just things that simply make money:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;First off, though, I want to make clear that "work on stuff that matters" &lt;em&gt;does not mean focusing on non-profit work, "causes, or any other form of "do-goodism."&lt;/em&gt; Non-profit projects often do matter a great deal, and &lt;a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;taxonomyName=Careers&amp;amp;articleId=330574&amp;amp;taxonomyId=10&amp;amp;intsrc=kc_li_story"&gt;people with tech skills can make important contributions&lt;/a&gt;, but it's essential to get beyond that narrow box. I'm a strong believer in the social value of business done right. We need to build an economy in which the important things are paid for in self-sustaining ways rather than as charities to be funded out of the goodness of our hearts. &lt;p&gt;...&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;Some of you may end up working at highflying companies. Some of you may succeed, and some of you may fail. I want to remind you that financial success is not the only goal or the only measure of success. It's easy to get caught up in the heady buzz of making money. You should regard money as fuel for what you really want to do, not as a goal in and of itself. &lt;strong&gt;Money is like gas in the car — you need to pay attention or you'll end up on the side of the road —&lt;/strong&gt; &lt;strong&gt;but a well-lived life is not a tour of gas stations!&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-4522880298398231011?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/y5GQV3Q-RnI" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4522880298398231011?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4522880298398231011?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/y5GQV3Q-RnI/money-is-gas-in-car.html" title="Money Is Gas in the Car" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2009/01/money-is-gas-in-car.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AHQH45fSp7ImA9WxVSFEg.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-1521808862087822659</id><published>2009-01-08T18:08:00.001-06:00</published><updated>2009-01-08T18:08:51.025-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-08T18:08:51.025-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dtd" /><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><title>What's Your Semantic Exit Strategy?</title><content type="html">&lt;p&gt;Quoting &lt;a href="http://www.cafeconleche.org/quotes2009.html#quote2009January7"&gt;Cafe Con Leche&lt;/a&gt; quoting &lt;a href="http://www.alistapart.com/articles/semanticsinhtml5"&gt;A List Apart&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;We&amp;#8217;ll start by posing the question: &amp;#8220;why are we inventing these new elements?&amp;#8221; A reasonable answer would be: &amp;#8220;because HTML lacks semantic richness, and by adding these elements, we increase the semantic richness of HTML&amp;#8212;that can&amp;#8217;t be bad, can it?&amp;#8221; &lt;/p&gt;    &lt;p&gt;By adding these elements, we are addressing the need for greater semantic capability in HTML, but only within a narrow scope. No matter how many elements we bolt on, we will always think of more semantic goodness to add to HTML. And so, having added as many new elements as we like, we still won&amp;#8217;t have solved the problem. We don&amp;#8217;t need to add &lt;strong&gt;specific terms&lt;/strong&gt; to the vocabulary of HTML, we need to add a &lt;strong&gt;mechanism&lt;/strong&gt; that allows semantic richness to be added to a document as required. In technical terms, we need to make HTML &lt;strong&gt;extensible&lt;/strong&gt;. HTML 5 proposes no mechanism for extensibility. &lt;/p&gt;    &lt;p&gt;HTML 5, therefore, implements a feature that breaks a sizable percentage of current browsers, and doesn&amp;#8217;t really allow us to add richer semantics to the language &lt;strong&gt;at all&lt;/strong&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This is an important warning for anyone creating or maintaining a custom XML document schema. Creating a tight, semantically correct element for every type of information in your existing documents is easy (and dangerously seductive); creating a mechanism by which the schema's users themselves can gracefully expand the semantic tagging as documents grow is much harder, and ultimately much more important.&amp;#160; Be as general as you can get away with, and as specific as you dare.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-1521808862087822659?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/ib002knUzh4" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/1521808862087822659?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/1521808862087822659?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/ib002knUzh4/what-your-semantic-exit-strategy.html" title="What&amp;#39;s Your Semantic Exit Strategy?" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2009/01/what-your-semantic-exit-strategy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04EQX08cSp7ImA9WxVSEkk.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-6016016461145529374</id><published>2009-01-06T06:45:00.000-06:00</published><updated>2009-01-06T06:45:00.379-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-06T06:45:00.379-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="windows" /><category scheme="http://www.blogger.com/atom/ns#" term="utilities" /><title>Lessons from a Windows Reinstall</title><content type="html">&lt;p&gt;The Windows install on my fiancee's laptop, a 3-year-old Gateway, had become unstable and slow (as Windows does if left alone for three years) so it was time to wipe the hard drive and start again.&amp;nbsp; I methodically prepared, backing up all the data to two different locations — Dropbox and an external hard drive.&amp;nbsp; Also, at my father's urging, I created a drive image using the free trial of &lt;a href="http://www.acronis.com/homecomputing/products/trueimage/"&gt;Acronis True Image&lt;/a&gt;, which I stored on an external hard drive.&amp;nbsp; I didn't think I'd need it, because the current install was so horrible that anything was preferable to it. &lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://flickr.com/photos/fatboyke/2668411239/"&gt;&lt;img src="http://farm4.static.flickr.com/3051/2668411239_9c8d7b2342_m.jpg"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So, I rebooted, I popped in the Gateway system restore disk, and told it to format the drive and reinstall the operating system.&amp;nbsp; &lt;/p&gt; &lt;p&gt;When it was done, the computer booted into Windows.&amp;nbsp; Happy surprise, the restore CD didn't reinstall all of the stupid cruft software that all consumer laptops come loaded with.&amp;nbsp; However, a not-so-happy-surprise — the CD also didn't reinstall any of the Gateway-specific drivers the laptop needed to function, so it couldn't use its wireless card or suspend.&amp;nbsp; &lt;/p&gt; &lt;p&gt;No problem, I thought, I'll get them from the system restore partition on the primary hard drive.&amp;nbsp; Hmm, the restore process repartitioned the drive and killed it.&amp;nbsp; (Really?)&amp;nbsp; Okay, no problem, I'll go to Gateway's website and download the drivers.&amp;nbsp; Hmm, those don't work. (Seriously?) I'll go to the chipset manufacturer's website.&amp;nbsp; Hmm, not there.&amp;nbsp; (Oh, no.)&lt;/p&gt; &lt;p&gt;This problem was entirely my fault.&amp;nbsp; I should have made absolutely sure I had the drivers I needed before wiping the disk, so I'll spare you the whole rant of WHY DOESN'T GATEWAY'S &lt;strong&gt;CUSTOM&lt;/strong&gt; SYSTEM RESTORE DISK CONTAIN THE DRIVERS TO ACTUALLY, YOU KNOW, RESTORE THE SYSTEM?&amp;nbsp; Because, that would be petty.&lt;/p&gt; &lt;p&gt;After some Internet searching, I discovered a free utility called &lt;a href="http://www.boozet.org/dd.htm"&gt;Double Driver&lt;/a&gt;, which allows you to backup and restore all the drivers installed on your system.&amp;nbsp; Which was great, except I'd already killed the Windows installation with the drivers I needed.&amp;nbsp; &lt;/p&gt; &lt;p&gt;To make a long story short, here's what I did:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Created a new drive image of my partially finished reinstall with Acronis True Image.  &lt;li&gt;Restored the original, pre-wipe drive image.  &lt;li&gt;Booted into Windows and ran Double Driver to create an archive of all the installed drivers on my USB drive.  &lt;li&gt;Restored the in-progress drive image.  &lt;li&gt;Used Double Driver to restore all the previously installed drivers.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Success!&amp;nbsp; (Well, Double driver actually missed one file, which I had to retrieve from the backup image.&amp;nbsp; But close enough.)&lt;/p&gt; &lt;p&gt;Also, although Acronis True Image saved the day, I can't recommend it as a product, since its background service slowed to a crawl the two computers I installed it on.&amp;nbsp; Which is too bad.&lt;/p&gt; &lt;p&gt;So, recapping today's lessons, if you're reinstalling Windows, you should first:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Backup all your data.&amp;nbsp; Twice.  &lt;li&gt;Create a drive image of your current install.&amp;nbsp; It will save your bacon.&amp;nbsp; &lt;li&gt;Create an archive of all your drivers using &lt;a href="http://www.boozet.org/dd.htm"&gt;DoubleDriver&lt;/a&gt;.&amp;nbsp; This too will save your bacon. &lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-6016016461145529374?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/0O3RLWwnNP0" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/6016016461145529374?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/6016016461145529374?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/0O3RLWwnNP0/lessons-from-windows-reinstall.html" title="Lessons from a Windows Reinstall" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2009/01/lessons-from-windows-reinstall.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAHQXs_fCp7ImA9WxVTFUw.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-4910554757518919946</id><published>2008-12-22T12:11:00.002-06:00</published><updated>2008-12-28T19:05:30.544-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-28T19:05:30.544-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="xproc" /><category scheme="http://www.blogger.com/atom/ns#" term="calabash" /><title>XProc, Part III — Turtles All The Way Down (Steps, Reuse, and Encapsulation)</title><content type="html">&lt;p&gt;This is my third post on &lt;a href="http://xproc.org/"&gt;XProc&lt;/a&gt;. (To see the first two, go &lt;a href="http://www.wordsinboxes.com/2008/11/getting-started-with-xproc-and-calabash.html"&gt;here&lt;/a&gt; and &lt;a href="http://www.wordsinboxes.com/2008/12/getting-started-with-xproc-part-ii.html"&gt;here&lt;/a&gt;.)&amp;nbsp; In this post, I'll talk about the different categories of steps, how to create your own steps and reuse them across pipelines, and how this all relates to the fundamental metaphor of XProc.&amp;nbsp; &lt;/p&gt; &lt;p&gt;One task I do frequently is removing &lt;a href="http://www.arbortext.com/namespace/atict/change-tracking-markup-spec.html"&gt;Arbortext Editor change-tracking markup&lt;/a&gt; from documents. Here's a simple pipeline that does just that:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;u:accept-changes&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;span style="color: blue"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;stylesheet&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:document &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;accept_changes.xslt&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;span style="color: blue"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;The fundamental unit of work in XProc is the "step," which you can think of in the same way you do subroutines in other programming languages. In general, a step takes XML as input, performs an operation on it, and outputs XML. There are &lt;a href="http://www.w3.org/TR/xproc/#step-concept"&gt;three types of steps&lt;/a&gt; in XProc: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://flickr.com/photos/austin80s/2303501094/sizes/l/"&gt;&lt;img height="155" alt="atomic" src="http://lh6.ggpht.com/_RxnSdqnpnDs/SU_YKA4KZ_I/AAAAAAAAAno/ukbRoH5d2_s/image_thumb%5B8%5D.png?imgmax=800" width="256" align="right" border="0"&gt;&lt;/a&gt;Atomic steps.&lt;/strong&gt; These are the most basic building blocks of XProc pipelines, and each carries out a single fundamental XML operation.&amp;nbsp; There are a number of &lt;a href="http://www.w3.org/TR/xproc/#std-components"&gt;built-in atomic steps&lt;/a&gt;, such as &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.pipeline"&gt;p:xslt&lt;/a&gt; (as shown above).&amp;nbsp; These built-in atomic steps will be the foundation for almost everything you do in XProc, so learn them.&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://flickr.com/photos/brapke/186542214/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="182" alt="image" src="http://lh5.ggpht.com/_RxnSdqnpnDs/SU_YMb6geiI/AAAAAAAAAns/HjrfFG39mIc/image_thumb%5B10%5D.png?imgmax=800" width="244" align="right" border="0"&gt;&lt;/a&gt; &lt;strong&gt;Compound steps.&amp;nbsp; &lt;/strong&gt;These are assembled from other XProc steps.&amp;nbsp; Sometimes they are just a series of implicitly connected atomic steps, and sometimes they use built-in logical control structures, such as &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.for-each"&gt;p:for-each&lt;/a&gt;, to control their execution. &lt;/p&gt;
&lt;p&gt;It turns out that the above accept-changes pipeline — and in fact any pipeline you create — &lt;a href="http://markmail.org/message/dgb6acpf4yulnfh5"&gt;is also a compound step&lt;/a&gt;.&amp;nbsp; (The fact that &lt;a href="http://www.wordsinboxes.com/2008/12/getting-started-with-xproc-part-ii.html"&gt;p:pipeline is a shortcut for p:declare-step&lt;/a&gt; is a dead giveaway.)&amp;nbsp; This is an important idea, and we'll discuss it more below.&amp;nbsp; But for now, remember this:&amp;nbsp; &lt;em&gt;a pipeline and a step are the same thing&lt;/em&gt;.&amp;nbsp; &lt;/p&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Multi-container steps.&lt;/strong&gt;&amp;nbsp; There are only two multi-container steps: &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.choose"&gt;p:choose&lt;/a&gt; and &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.try"&gt;p:try&lt;/a&gt;.&amp;nbsp; These contain two or more alternate pipelines.&amp;nbsp; You cannot define your own custom multi-container step.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;No doubt, in your day-to-day work, you'll never feel the need to stop and consider whether a certain step fits one category or the other.&amp;nbsp; But the difference does have consequences, so it's worth spending a bit of time on it.&lt;/p&gt;
&lt;p&gt;Let's say that you want to use the above accept-changes step as a step within a larger pipeline — for example, a pipeline that removes all of the notes from 2nd-level sections in a document.&amp;nbsp; Here's how you would do that:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;delete-notes&lt;/span&gt;" 
    &lt;span style="color: red"&gt;xmlns:p&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/ns/xproc&lt;/span&gt;" 
    &lt;span style="color: red"&gt;xmlns:atict&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;&lt;a href="http://www.arbortext.com/namespace/atict&amp;quot;"&gt;http://www.arbortext.com/namespace/atict&lt;/span&gt;"
&lt;/a&gt;    &lt;span style="color: red"&gt;xmlns:u&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.wordsinboxes.com/xproc&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;

  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:serialization &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;result&lt;/span&gt;" &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;" &lt;span style="color: red"&gt;method&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;xml&lt;/span&gt;"  
    &lt;span style="color: red"&gt;omit-xml-declaration&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;false&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;

  &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;Declare accept-changes step &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;

  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;u:accept-changes&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;    
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;stylesheet&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:document &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;accept_changes.xslt&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  
  &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;Pipeline flow starts here &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;  

  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;u:accept-changes &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;remove-tracking-markup&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:delete &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;delete-level-2-notes&lt;/span&gt;" 
    &lt;span style="color: red"&gt;match&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;/chapter/section/section/note&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
     
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;What's happening is that we are declaring a new step &lt;em&gt;type&lt;/em&gt; called "u:accept-changes," and then invoking an &lt;em&gt;instance&lt;/em&gt; of it as the first step in the pipeline.&amp;nbsp; A few notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The u:accept-changes step declaration itself is not executed directly; only it's instance on line 21 is.&amp;nbsp; More formally, a pipeline element that is the child of another pipeline element (unlike what we've seen before) is used to define a step that can be invoked later.
As an analogy to other programming languages, you are defining a object type and then creating an instance of it.&amp;nbsp; As a result, there is no need in this pipeline for explicit piping; the default implicit connections suffice. 
&lt;li&gt;A step's &lt;em&gt;type&lt;/em&gt; attribute is different than its &lt;em&gt;name&lt;/em&gt; attribute.&amp;nbsp; The value you place in &lt;em&gt;type&lt;/em&gt; becomes the name of the element you use to invoke it (lines 11 and 21).&amp;nbsp; That instance can itself be given a name, which can then be used when controlling the flow of XML using pipes.&amp;nbsp; So, a &lt;em&gt;type&lt;/em&gt; refers to the object, and a &lt;em&gt;name&lt;/em&gt; refers to the instance. 
&lt;li&gt;A step's type must be in a non-XProc namespace, which you must remember to declare.&amp;nbsp; &lt;li&gt;The &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.serialization"&gt;p:serialization&lt;/a&gt; element defines how a specified pipeline output port serializes XML when outputting from the pipeline.&amp;nbsp; It is the equivalent of the xsl:output instruction in XSLT, and takes many of the same options.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Of course, if you're going to just reference your new step type once within the same pipeline that you've declared it in, there's not really much of a point.&lt;/p&gt;
&lt;p&gt;The real power of declaring your own step type comes from the ability to place it in an external library and create instances of it within any number of pipelines.&amp;nbsp; Here's how you do that, using &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.import"&gt;p:import&lt;/a&gt;.&amp;nbsp; First, the library document:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:library 
    &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:p&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/ns/xproc&lt;/span&gt;" 
    &lt;span style="color: red"&gt;xmlns:atict&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.arbortext.com/namespace/atict&lt;/span&gt;"
    &lt;span style="color: red"&gt;xmlns:u&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.wordsinboxes.com/xproc&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;

  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;u:accept-changes&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;    
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;stylesheet&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:document &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;accept_changes.xslt&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
       
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:library&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Note the root element &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.library"&gt;p:library&lt;/a&gt;, which is used as a container for a collection of custom steps.&amp;nbsp; If I wanted, I could have made the p:pipeline element the root element, and imported that single step, but using p:library leaves more room for future growth.&lt;/p&gt;
&lt;p&gt;Here's the final pipeline, which imports the above library:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;delete-notes&lt;/span&gt;" 
    &lt;span style="color: red"&gt;xmlns:p&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/ns/xproc&lt;/span&gt;" 
    &lt;span style="color: red"&gt;xmlns:atict&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.arbortext.com/namespace/atict&lt;/span&gt;"
    &lt;span style="color: red"&gt;xmlns:u&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.wordsinboxes.com/xproc&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;

  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:serialization &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;result&lt;/span&gt;" &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;" &lt;span style="color: red"&gt;method&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;xml&lt;/span&gt;"  
    &lt;span style="color: red"&gt;omit-xml-declaration&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;false&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;

  &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;Import accept-changes step &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;

  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:import &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;lib.xpl&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  
  &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;Pipeline flow starts here &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;  

  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;u:accept-changes &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;remove-tracking-markup&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
 
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:delete &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;delete-level-2-notes&lt;/span&gt;" 
    &lt;span style="color: red"&gt;match&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;/chapter/section/section/note&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
     
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;There.&amp;nbsp; A nice and simple pipeline.&amp;nbsp; I (and anyone else) can reference this u:accept-changes step in any number of pipelines, and never worry about how it actually works.&amp;nbsp; (And, if you stored the transform inside the u:accept-changes definition using &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.inline"&gt;p:inline&lt;/a&gt;, it would be even more portable.)&amp;nbsp; Later, if I decide that I'm better served by using a Python script to accept changes instead of a transform, I can simply update the step declaration (using &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#c.exec"&gt;p:exec&lt;/a&gt;) once in the library.&amp;nbsp; My hope is that &lt;a title="EXProc" href="http://exproc.org/"&gt;XProc will become a common language&lt;/a&gt; for sharing XML manipulation tasks.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;It's also worth noting that if I gave this note-deleting pipeline a type attribute, then it too could be invoked as step in another pipeline.&amp;nbsp; And that pipeline could be invoked as a step, and so on.&amp;nbsp; Turtles all the way down.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://flickr.com/photos/jef/2810419826/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="image" src="http://lh5.ggpht.com/_RxnSdqnpnDs/SU_YOi6_JrI/AAAAAAAAAnw/U-wbHC2wuak/image_thumb%5B12%5D.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Here's where the difference between an atomic step and a compound step comes into play.&amp;nbsp; Although we defined our accept-changes step as a &lt;em&gt;compound step&lt;/em&gt; (because it contains a subpipeline of one step), when we invoke an instance of it, that instance is an &lt;em&gt;atomic step&lt;/em&gt;.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;If that is confusing (and it sure confused me at first), it helps if you think about the step from two separate perspectives — from within, looking at the implementation details, and without, looking at what actually enters and leaves the step.&amp;nbsp; We've already covered the inside.&amp;nbsp; From the outside, when you call an instance, that instance is a black box which XML enters and XML leaves — &lt;a href="http://markmail.org/message/sofszu2gy4iapgvp"&gt;&lt;em&gt;exactly like a built-in atomic step&lt;/em&gt;&lt;/a&gt;.&amp;nbsp; The fact that it's actually implemented by assembling XProc steps is irrelevant to the calling pipeline.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;There's one more important XProc fact I've talked around but never explicitly stated.&amp;nbsp; &lt;em&gt;The only information that can flow between steps through pipes is XML. &lt;/em&gt;At first, I thought this a stifling restriction, but as I work more with XProc, I think that this prohibition is the key to its power.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Because, when you combine all these ideas, you end up with a very high level of enforced encapsulation that provides a very simple yet powerful abstraction for working with XML.&amp;nbsp; It allows you to worry about &lt;em&gt;what&lt;/em&gt; needs to be done instead of &lt;em&gt;how&lt;/em&gt;.&amp;nbsp; When any pipeline can be used as an atomic step, you can &lt;a href="http://bitworking.org/news/388/broke"&gt;work fractally&lt;/a&gt;, making parts out of the same raw material as the whole, creating higher and higher levels of abstraction.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://flickr.com/photos/jdvolcan/2396815306/"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="164" alt="image" src="http://lh6.ggpht.com/_RxnSdqnpnDs/SU_YRH_6t6I/AAAAAAAAAn0/4fcvovMcdJw/image_thumb%5B11%5D.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, to summarize:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A pipeline is a step. 
&lt;li&gt;Although the &lt;em&gt;declaration&lt;strong&gt; &lt;/strong&gt;&lt;/em&gt;of a step may be a compound step, its &lt;em&gt;invocation&lt;/em&gt; is not.&amp;nbsp; &lt;li&gt;XML is the only information that can flow between steps through pipes.&amp;nbsp; &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;That's it for now.&amp;nbsp; If you're looking for more XProc information, Dave Pawson has been working on &lt;a href="http://www.dpawson.co.uk/xproc/"&gt;his introduction to XProc&lt;/a&gt;, which is shaping up to be a great resource.&lt;/p&gt;
&lt;p&gt;I may start posting my XProc-related material in a more suitable space, away from my blog.&amp;nbsp; I'm considering using Docbook Website system.&amp;nbsp; Any thoughts?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-4910554757518919946?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/DJWqyVK9ANA" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4910554757518919946?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4910554757518919946?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/DJWqyVK9ANA/xproc-part-iii-turtles-all-way-down.html" title="XProc, Part III — Turtles All The Way Down (Steps, Reuse, and Encapsulation)" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/12/xproc-part-iii-turtles-all-way-down.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUEQ3w4cCp7ImA9WxRaFE4.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-4099127641176269102</id><published>2008-12-16T07:30:00.000-06:00</published><updated>2008-12-16T07:30:02.238-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-16T07:30:02.238-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="links" /><title>Recently In Markup</title><content type="html">&lt;ul&gt; &lt;li&gt;&lt;b&gt;&lt;a href="http://www.cafeconleche.org/#December_8_2008_22075"&gt;Cafe con Leche&lt;/a&gt;&lt;/b&gt;&lt;br&gt;"The W3C Core Working group has broken faith with the XML community by publishing an XML 1.0, fifth edition spec that is incompatible with all previous versions."  &lt;li&gt;&lt;b&gt;&lt;a href="http://bitworking.org/news/388/broke"&gt;Joe Gregorio | BitWorking | CS Broke&lt;/a&gt;&lt;/b&gt;&lt;br&gt;"What part of the computer in front of you is fractal?"  &lt;li&gt;&lt;b&gt;&lt;a href="http://www.robvanderwoude.com/batchfiles.html"&gt;Batch files&lt;/a&gt;&lt;/b&gt;&lt;br&gt;More than you ever wanted to know about how to write Windows batch files.  &lt;li&gt;&lt;b&gt;&lt;a href="http://www.fgeorges.org/exslt2-wiki/Main_Page"&gt;Main Page - Exslt2&lt;/a&gt;&lt;/b&gt;&lt;br&gt;The beginning of the discussion for EXSLT 2.0.  &lt;li&gt;&lt;b&gt;&lt;a href="http://www.dpawson.co.uk/nodesets/entries/081201.html"&gt;Marklogic review&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Dave Pawson reviews MarkLogic ... and gives up.  &lt;li&gt;&lt;b&gt;&lt;a href="http://www.jenitennison.com/blog/node/95"&gt;Overlap, Containment and Dominance | Jeni's Musings&lt;/a&gt;&lt;/b&gt;  &lt;li&gt;&lt;b&gt;&lt;a href="http://www.b-list.org/weblog/2008/dec/05/python-3000/"&gt;Let's talk about Python 3.0&lt;/a&gt;&lt;/b&gt;&lt;br&gt;"You build a nice big room-sized cage, and in one end of it you put five monkeys. In the other end you put the banana." &lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-4099127641176269102?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/OxcMEvfc6sA" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4099127641176269102?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4099127641176269102?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/OxcMEvfc6sA/recently-in-markup.html" title="Recently In Markup" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/12/recently-in-markup.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8EQXczeSp7ImA9WxRaEUo.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-3283901783946886486</id><published>2008-12-13T08:00:00.000-06:00</published><updated>2008-12-13T08:00:00.981-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-13T08:00:00.981-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="links" /><title>This Week in Google Reader</title><content type="html">&lt;ul&gt;   &lt;li&gt;&lt;b&gt;&lt;a href="http://apelad.blogspot.com/2008/12/laugh-out-loud-cats-1006.html"&gt;Laugh-Out-Loud Cats #1006&lt;/a&gt;&lt;/b&gt;      &lt;br /&gt;(via &lt;a href="http://apelad.blogspot.com/"&gt;HOBOTOPIA&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;&lt;b&gt;&lt;a href="http://feeds.feedburner.com/~r/scienceblogs/uncertainprinciples/~3/480720128/teachers_quarterbacks_and_mark.php"&gt;Teachers, Quarterbacks, and Markets&lt;/a&gt;&lt;/b&gt;      &lt;br /&gt;(via &lt;a href="http://scienceblogs.com/principles/"&gt;Uncertain Principles&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;&lt;b&gt;&lt;a href="http://garfieldminusgarfield.net/post/64117945"&gt;Photo&lt;/a&gt;&lt;/b&gt;      &lt;br /&gt;(via &lt;a href="http://garfieldminusgarfield.net/"&gt;garfield minus garfield&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;&lt;b&gt;&lt;a href="http://wemadethis.typepad.com/we_made_this/2008/12/wireframe-lamborghini.html"&gt;Wireframe Lamborghini&lt;/a&gt;&lt;/b&gt;      &lt;br /&gt;(via &lt;a href="http://wemadethis.typepad.com/we_made_this/"&gt;We Made This&lt;/a&gt;)&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-3283901783946886486?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/-TgohR5ike8" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/3283901783946886486?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/3283901783946886486?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/-TgohR5ike8/this-week-in-google-reader_13.html" title="This Week in Google Reader" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/12/this-week-in-google-reader_13.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMAQ3Y_eip7ImA9WxRbFkQ.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-759284945328205288</id><published>2008-12-07T17:27:00.001-06:00</published><updated>2008-12-07T17:27:22.842-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-07T17:27:22.842-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="xproc" /><category scheme="http://www.blogger.com/atom/ns#" term="calabash" /><title>Getting Started With XProc, Part II</title><content type="html">&lt;p&gt;In my &lt;a href="http://www.wordsinboxes.com/2008/11/getting-started-with-xproc-and-calabash.html"&gt;previous post&lt;/a&gt;, I showed how to set up a batch script to run Calabash in Windows.&amp;nbsp; This time I'll show how to write a useful — if simple — XProc pipeline.&amp;nbsp; Here it is:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:p&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;&lt;a href="http://www.w3.org/ns/xproc&amp;quot;&amp;gt;"&gt;http://www.w3.org/ns/xproc&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;span style="color: blue"&gt;
&lt;/a&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;stylesheet&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:document &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;sort.xslt&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;

  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;stylesheet&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:document &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;to_wordml.xslt&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;

&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;So what happens here?&amp;nbsp; When you execute it from the command line using:&lt;/p&gt;
&lt;p&gt;runcalabash -i "source=in.xml" -o "result=out.xml' sort-and-print.xpl&lt;/p&gt;
&lt;p&gt;this pipeline reads the input XML (in.xml), executes the first transform on it, passes the result to the second transform, executes that transform, and the saves the result as out.xml.&amp;nbsp; But the syntax of XProc is clear enough you probably guessed that on your own.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;The fundamental metaphor of XProc is that XML data "flows" into a pipeline and between its steps through a series of connected ports.&amp;nbsp; The two most common and important ports are the primary input port (usually called "source") and the primary output port (usually called "result").&amp;nbsp; There are others, and not every step actually has both of these, but that's another discussion.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;This isn't obvious in the above pipeline because all of the input and output ports, and the connections between them, are implicit.&amp;nbsp; There are more explicit ways to state most of the pipeline.&amp;nbsp; For example, it turns out that &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.pipeline"&gt;p:pipeline&lt;/a&gt; is just syntactic sugar for &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.declare-step"&gt;p:declare-step&lt;/a&gt;.&amp;nbsp; In other words:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:p&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/ns/xproc&lt;/span&gt;" &lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipeline&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;is equivalent to:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:declare-step &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:p&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/ns/xproc&lt;/span&gt;" &lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;source&lt;/span&gt;" &lt;span style="color: red"&gt;primary&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameters&lt;/span&gt;" &lt;span style="color: red"&gt;kind&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameter&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:output &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;result&lt;/span&gt;" &lt;span style="color: red"&gt;primary&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:declare-step&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Expanding on this, here's a more explicit version of our original pipeline:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:declare-step &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;sort-and-print&lt;/span&gt;" &lt;span style="color: red"&gt;xmlns:p&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/ns/xproc&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;source&lt;/span&gt;" &lt;span style="color: red"&gt;primary&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:output &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;result&lt;/span&gt;" &lt;span style="color: red"&gt;primary&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipe &lt;/span&gt;&lt;span style="color: red"&gt;step&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;print&lt;/span&gt;" &lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;result&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:output&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameters&lt;/span&gt;" &lt;span style="color: red"&gt;kind&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameter&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;sort&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;source&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipe &lt;/span&gt;&lt;span style="color: red"&gt;step&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;sort-and-print&lt;/span&gt;" &lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;source&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;stylesheet&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:document &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;sort.xslt&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameters&lt;/span&gt;" &lt;span style="color: red"&gt;kind&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameter&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipe &lt;/span&gt;&lt;span style="color: red"&gt;step&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;sort-and-print&lt;/span&gt;" &lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameters&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;

  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;print&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;source&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipe &lt;/span&gt;&lt;span style="color: red"&gt;step&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;sort&lt;/span&gt;" &lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;result&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;stylesheet&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:document &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;to_wordml.xslt&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameters&lt;/span&gt;" &lt;span style="color: red"&gt;kind&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameter&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:pipe &lt;/span&gt;&lt;span style="color: red"&gt;step&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;sort-and-print&lt;/span&gt;" &lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;parameters&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:input&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:xslt&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:declare-step&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;That's quite a mouthful, but it exposes the relationships between all the steps.&amp;nbsp; There are a few things worth noting.&amp;nbsp; First, the &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.pipe"&gt;p:pipe&lt;/a&gt; element connects the input of a step to another step.&amp;nbsp; In the above pipelines, these elements are redundant, since XProc automatically connects sequential sibling steps, but they become necessary when you need to connect non-sibiling steps in larger, more complicated pipelines. &lt;/p&gt;
&lt;p&gt;Second, &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#step-names"&gt;every step can be given a name&lt;/a&gt; using the "name" attribute, and that name must be &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#scoping"&gt;unique&lt;/a&gt; within the pipeline.&amp;nbsp; These names can be referenced by the "step" attribute of p:pipe to explicitly connect ports.&amp;nbsp; If a step isn't given an explicit name, one is generated internally by the XProc processor.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Third, the &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#c.xslt"&gt;p:xslt&lt;/a&gt; step gets its stylesheet from a port that is just like any other port.&amp;nbsp; Most of the time, you will explicitly point to a stylesheet using a &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.document"&gt;p:document&lt;/a&gt; element, but you have a lot more flexibility than that.&amp;nbsp; For example, you can programmatically create a stylesheet in one step, and then pipe it to a p:xslt to execute it.&amp;nbsp; This would be a great alternative to using saxon:compile-stylesheet() and saxon:transform() within a single, multiple pass stylesheet.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Fourth, &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#p.output"&gt;p:output&lt;/a&gt; works a bit differently than you might expect (as talked about recently on xproc-dev &lt;a href="http://markmail.org/message/dbgyt6ohmszafjmk"&gt;here&lt;/a&gt; and &lt;a href="http://markmail.org/message/rhdti2od2j5xtk6m"&gt;here&lt;/a&gt;).&amp;nbsp; The p:output step does not define where the output for a step goes; it defines where the output comes from.&amp;nbsp; So, while it may initially seem like this&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:output &lt;/span&gt;&lt;span style="color: red"&gt;port&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;result&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:document &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;out.xml&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p:output&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;will send the output to out.xml, it instead sends the content of out.xml to the "result" output port.&amp;nbsp; What this means is that where the output port of a pipeline or a step goes cannot be defined within that pipeline or step.&amp;nbsp; It must be defined &lt;strong&gt;outside&lt;/strong&gt; that step or pipeline — for example on the command line or in the input port of another step.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;(If you want the other effect, you can use &lt;a href="http://www.w3.org/XML/XProc/docs/langspec.html#c.store"&gt;p:store&lt;/a&gt;, which can be thought of as the equivalent of &amp;lt;xsl:result-document/&amp;gt; in XSLT, but in that case the primary output from is actually the name of the file you are writing and not the actual content of the output.)&amp;nbsp; &lt;/p&gt;
&lt;p&gt;That's it for now.&amp;nbsp; Next time:&amp;nbsp; How to create and use a library of custom XProc steps.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-759284945328205288?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/uEyIWFWxfw0" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/759284945328205288?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/759284945328205288?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/uEyIWFWxfw0/getting-started-with-xproc-part-ii.html" title="Getting Started With XProc, Part II" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/12/getting-started-with-xproc-part-ii.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAHRnc-cCp7ImA9WxRbFUo.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-4578067273810682407</id><published>2008-12-06T09:18:00.001-06:00</published><updated>2008-12-06T09:18:57.958-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-06T09:18:57.958-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="links" /><title>This Week in Google Reader</title><content type="html">&lt;ul&gt; &lt;li&gt;&lt;b&gt;&lt;a href="http://featuresblogs.chicagotribune.com/eric2_0/2008/12/obama-uses-zune.html#more"&gt;Obama uses Zune. Will iPod fans demand apology? | Eric 2.0&lt;/a&gt;&lt;/b&gt;&lt;br&gt;(via &lt;a href="http://featuresblogs.chicagotribune.com/"&gt;featuresblogs.chicagotribune.com&lt;/a&gt;)&lt;br&gt;Note also that the reporter that broke the story is named Santos.  &lt;li&gt;&lt;b&gt;&lt;a href="http://www.marginalrevolution.com/marginalrevolution/2008/12/joe-the-plumber.html"&gt;Joe the Plumber and his favorite books&lt;/a&gt;&lt;/b&gt;&lt;br&gt;(via &lt;a href="http://www.marginalrevolution.com/marginalrevolution/"&gt;Marginal Revolution&lt;/a&gt;)&lt;br&gt;Also, Joe the Plumber is writing his first book.  &lt;li&gt;&lt;b&gt;&lt;a href="http://garfieldminusgarfield.net/post/62426058"&gt;Photo&lt;/a&gt;&lt;/b&gt;&lt;br&gt;(via &lt;a href="http://garfieldminusgarfield.net/"&gt;garfield minus garfield&lt;/a&gt;)&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-4578067273810682407?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/t9hGt2NRRCw" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4578067273810682407?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4578067273810682407?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/t9hGt2NRRCw/this-week-in-google-reader.html" title="This Week in Google Reader" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/12/this-week-in-google-reader.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8EQXg8fCp7ImA9WxRbFEU.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-389367620415443418</id><published>2008-12-05T07:30:00.000-06:00</published><updated>2008-12-05T07:30:00.674-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-05T07:30:00.674-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="fonts" /><category scheme="http://www.blogger.com/atom/ns#" term="helvetica" /><title>Typography and the New York City Subway</title><content type="html">&lt;p&gt;An &lt;a href="http://www.aiga.org/content.cfm/the-mostly-true-story-of-helvetica-and-the-new-york-city-subway?pp=1"&gt;AIGA article&lt;/a&gt; and a New York Times &lt;a href="http://cityroom.blogs.nytimes.com/2008/12/04/how-helvetica-took-over-the-subway/"&gt;blog post&lt;/a&gt; about the history of the typography of the NYC subway system are both good reads:&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Helvetica was originally created in Switzerland. It was &lt;a href="http://coupland.blogs.nytimes.com/2006/08/27/i-luv-helvetica/"&gt;a neutral typeface from a neutral country&lt;/a&gt; and &lt;a href="http://coupland.blogs.nytimes.com/2006/08/27/i-luv-helvetica/"&gt;gained runaway popularity starting in the 1960s for its modern grace&lt;/a&gt;. But the subway system looked elsewhere.&lt;/p&gt;    &lt;p&gt;&amp;#8220;It was an incredibly courageous thing to do at a time when Helvetica was riding high,&amp;#8221; Mr. Shaw said. &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;That's right.&amp;#160; Typography as an act of bravery.&amp;#160; &lt;/p&gt;  &lt;p&gt;(via &lt;a href="http://daringfireball.net/linked/2008/12/04/helvetica-mta"&gt;Daring Fireball&lt;/a&gt;)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-389367620415443418?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/0BWObX0ZgEU" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/389367620415443418?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/389367620415443418?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/0BWObX0ZgEU/typography-and-new-york-city-subway.html" title="Typography and the New York City Subway" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/12/typography-and-new-york-city-subway.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMEQHk4fip7ImA9WxRbE0Q.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-8751946772205929977</id><published>2008-12-04T07:30:00.000-06:00</published><updated>2008-12-04T07:30:01.736-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-04T07:30:01.736-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XSpec" /><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="testing" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="XSLT" /><title>Getting Started With XSpec</title><content type="html">&lt;p&gt;Lately I've been working with &lt;a href="http://code.google.com/p/xspec/w/list"&gt;XSpec&lt;/a&gt;, a new testing framework for XSLT created by &lt;a href="http://www.jenitennison.com"&gt;Jeni Tennison&lt;/a&gt;. I dabbled with Jeni's old testing framework, &lt;a href="http://www.jenitennison.com/xslt/utilities/unit-testing/"&gt;Tennison Tests&lt;/a&gt;, but I never could muster the discipline to use it as much as I should. XSpec makes testing frictionless, which is really how it must be if I'm going to make it a habit.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Here's how to integrate it into Oxygen:&lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/_RxnSdqnpnDs/STSmnmyrGZI/AAAAAAAAAm4/CXRxajyqFDI/s1600-h/xspec_toolbar8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="22" alt="xspec_toolbar" src="http://lh3.ggpht.com/_RxnSdqnpnDs/STSmoIkeOfI/AAAAAAAAAm8/PSZpAUgS1K4/xspec_toolbar_thumb6.png?imgmax=800" width="354" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;On Windows, XSpec is launched by &lt;a href="http://code.google.com/p/xspec/wiki/RunningScenarios"&gt;running a batch file&lt;/a&gt;. It's simple to hook up this batch file to Oxygen as an external tool so that you can run an XSpec suite by clicking a button.&amp;nbsp; By being a little clever - and sticking to a consistent naming convention - we can set it up so that we can activate the tests either from the XSpec document itself, or the XSLT you're developing.&amp;nbsp; The caveat is that you must save your XSpec documents in the same folder as the XSLT, and give it the same name as that transform, except with the extension "xspec" instead of "xslt." (For example, &lt;tt&gt;my_stylesheet.xspec&lt;/tt&gt; tests &lt;tt&gt;my_stylesheet.xslt&lt;/tt&gt;.) If you want to follow a different convention, adjust the following instructions appropriately.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Download XSpec and unzip it somewhere in your system path. I recommend getting the latest xspec.bat and transforms, since Jeni's fixed a few bugs from the initial release.  &lt;li&gt;Open up xspec.bat, and edit the third line to set the CP (or class path) variable to the location where Saxon is installed. (If you don't have Saxon, &lt;a href="http://saxon.sourceforge.net/"&gt;get it&lt;/a&gt;).  &lt;li&gt;Now we need to add XSpec as an external tool in Oxygen. To do so, go to &lt;tt&gt;Tools&lt;/tt&gt; &amp;gt; &lt;tt&gt;External Tools&lt;/tt&gt; &amp;gt; &lt;tt&gt;Preferences&lt;/tt&gt; &amp;gt; &lt;tt&gt;New&lt;/tt&gt; and fill out the fields like so:  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/_RxnSdqnpnDs/STSmoqaNGUI/AAAAAAAAAnA/EFkhaoIKZjc/s1600-h/XSpec_oxygen8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="460" alt="XSpec_oxygen" src="http://lh5.ggpht.com/_RxnSdqnpnDs/STSmpNQk6-I/AAAAAAAAAnE/qOGgW-e9r1g/XSpec_oxygen_thumb8.png?imgmax=800" width="409" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;(Make sure to change the paths to match those on your computer.)&lt;/p&gt; &lt;li&gt;I like to tell Oxygen to make XSpec-namespaced elements a different color. To do that, go to &lt;tt&gt;Options &amp;gt; Preferences &amp;gt; Editor &amp;gt; Colors &amp;gt; Elements by Prefix&lt;/tt&gt;.&amp;nbsp; This makes it easier to differentiate between XSpec instructions, and the inline XML test data. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Now you should have a button on your toolbar labeled "Run XSpec Test." If it doesn't show up, make sure to activate the "External Tools" toolbar. &lt;/p&gt; &lt;p&gt;Here's an example of a successful test report:&lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/_RxnSdqnpnDs/STSmqArKwtI/AAAAAAAAAnI/kgQJSt5OjAg/s1600-h/xspec_report3.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="xspec_report" src="http://lh5.ggpht.com/_RxnSdqnpnDs/STSmryRZahI/AAAAAAAAAnM/Hemg5mnDsz0/xspec_report_thumb1.png?imgmax=800" width="420" border="0"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-8751946772205929977?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/tyFx9XWe48Q" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/8751946772205929977?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/8751946772205929977?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/tyFx9XWe48Q/getting-started-with-xspec.html" title="Getting Started With XSpec" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/12/getting-started-with-xspec.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cGQ3szfSp7ImA9WxRbEk8.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-531810993925807243</id><published>2008-12-02T07:30:00.001-06:00</published><updated>2008-12-02T07:37:02.585-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-02T07:37:02.585-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="creativity" /><title>Creativity and “Courageous Sucking”</title><content type="html">&lt;p&gt;&lt;/p&gt;  &lt;p&gt;From &lt;a href="http://www.43folders.com/2008/12/01/courageous-sucking"&gt;43 Folders&lt;/a&gt; (emphasis mine):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;I laid on the sidewalk. All the way down. On my gut on 50° of western San Francisco concrete.&lt;/p&gt;    &lt;p&gt;And, I took my time, thinking about the aperture (all the way open for depth of field) and the available light (very little, so I put the the camera right on the ground to steady it). I snapped a dozen or more shots with slightly different settings. No idea what I was doing. People walked by, cars passed, the L barreled by, but I kept shooting until I was satisfied that I might have &lt;em&gt;something&lt;/em&gt;. Then, I grabbed the shoe, stood up, and trotted back up the hill, triumphant, with a recovered piece of footwear, plus what I suspected might be at least one &lt;a href="http://www.flickr.com/photos/merlin/3072467125/"&gt;pretty good photo&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt;I like how it turned out.&lt;/p&gt;    &lt;p&gt;Yeah, I know, it’s no masterpiece, but I’m proud of it for reasons of my own. Because, last night, as I was splayed prone in the fog along Taraval Street, I realized I was getting a little better at this. &lt;/p&gt;    &lt;p&gt;Not because I’d been magically touched with mythical creativity and skill, &lt;strong&gt;but because for a moment I was thinking more about how to use what I’d learned to get a good photo than I was about how I might have looked while doing it&lt;/strong&gt;. And, that felt like a small turning point.&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-531810993925807243?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/IhuibC-iy3s" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/531810993925807243?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/531810993925807243?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/IhuibC-iy3s/creativity-and-courageous-sucking.html" title="Creativity and “Courageous Sucking”" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/12/creativity-and-courageous-sucking.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MEQXg6fSp7ImA9WxRVFks.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-9014993719886583887</id><published>2008-11-14T07:30:00.001-06:00</published><updated>2008-11-14T07:30:00.615-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-14T07:30:00.615-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="chili" /><category scheme="http://www.blogger.com/atom/ns#" term="recipe" /><category scheme="http://www.blogger.com/atom/ns#" term="cooking" /><category scheme="http://www.blogger.com/atom/ns#" term="food" /><title>A Man and His Chili</title><content type="html">&lt;p&gt;Every man needs a chili recipe.&amp;nbsp; As of a week ago, I have mine.&lt;/p&gt; &lt;p&gt;This is based on &lt;a href="http://allrecipes.com/Recipe/Flatlander-Chili/Detail.aspx"&gt;one from Allrecipies&lt;/a&gt;, but I modified it by halving the beef, adding more beans, and doubling most of the spices except for the chili powder, which I halved.&amp;nbsp; To me, too much chili powder obscures the other tastes.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Ingredients&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;1.25 pounds of lean ground beef  &lt;li&gt;30 oz of tomato juice, maybe less.&amp;nbsp; Put this in last so you don't make it too soupy.  &lt;li&gt;2 cups chopped onion  &lt;li&gt;1/2 cup chopped celery  &lt;li&gt;1/2 cup chopped green bell pepper  &lt;li&gt;1/8 - 1/4 cup Chili powder  &lt;li&gt;2 teaspoons ground cumin  &lt;li&gt;2 teaspoons garlic powder  &lt;li&gt;1 teaspoon salt  &lt;li&gt;1 teaspoon ground black pepper  &lt;li&gt;1/2 teaspoon oregano  &lt;li&gt;1/2 teaspoon white sugar  &lt;li&gt;1/4 teaspoon ground cayenne pepper (more if you want)  &lt;li&gt;2 cans of red beans, drained and rinsed  &lt;li&gt;1 can of pinto beans, drained and rinsed &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Directions&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Brown ground beef on stove.&amp;nbsp; Drain and crumble.  &lt;li&gt;Add all ingredients to a large kettle.&amp;nbsp; Bring to a boil.&amp;nbsp; Reduce heat and simmer very slowly for at least 2 hours, preferably more.&amp;nbsp; If you have a crock pot, use that.  &lt;li&gt;Serve with sour cream or cheese.&amp;nbsp; &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-9014993719886583887?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/_ktGP3akECc" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/9014993719886583887?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/9014993719886583887?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/_ktGP3akECc/man-and-his-chili.html" title="A Man and His Chili" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/11/man-and-his-chili.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQAQnszcSp7ImA9WxRVFU0.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-4849126235499452409</id><published>2008-11-12T09:05:00.002-06:00</published><updated>2008-11-12T10:12:23.589-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-12T10:12:23.589-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="xproc" /><category scheme="http://www.blogger.com/atom/ns#" term="calabash" /><title>Getting Started With XProc and Calabash on Windows</title><content type="html">&lt;p&gt;I've been excited for a long time about the coming of &lt;a href="http://www.w3.org/TR/xproc/"&gt;XProc&lt;/a&gt;, an XML pipelining language.  A lot of my work involves running XML documents through series of transformations, which often means  hacking up batch files or, for more permanent pipelines, writing an Ant build.  Both of these methods are clunky at best and unmaintainable nightmares at worst.&lt;/p&gt; &lt;p&gt;&lt;a href="http://norman.walsh.name/"&gt;Norm Walsh&lt;/a&gt; has been hard at work on his XProc implementation, &lt;a href="http://xmlcalabash.com/"&gt;XML Calabash&lt;/a&gt;. I've been experimenting with it, and while there are still issues to work out (it's alpha, after all), I'm already doing useful work with it.   But since XProc is so new, there's almost no documentation available. There's the &lt;a href="http://www.w3.org/TR/xproc/"&gt;spec&lt;/a&gt;, of course, but that's aimed more towards implementers and less toward end users.  Other than that, the only resources I've found are the &lt;a href="http://xmlcalabash.com/docs/"&gt;Calabash documentation page&lt;/a&gt;, &lt;a href="http://norman.walsh.name/2008/08/24/xproc-dev"&gt;xproc-dev mailing list&lt;/a&gt;, &lt;a href="http://nwalsh.com/docs/presentations/2007/xml2007/plain.html"&gt;Norm Walsh's 2007 presentation&lt;/a&gt;, and a &lt;a href="http://fgeorges.blogspot.com/2008/10/poor-mans-calabash-integeration-into.html"&gt;few blog posts&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;So this is the first in hopefully a series of posts aimed to create at least some initial public documentation about how to actually get things done using XProc.  I'll post things as I learn.  But caveat emptor - these shouldn't be confused for "best practices."&lt;/p&gt; &lt;p&gt;Before you can do anything, you have to get and install Calabash.  Once you &lt;a href="http://xmlcalabash.com/download/"&gt;download&lt;/a&gt; it, place it somewhere in your system path.  (Mine's in c:\home\scripts\calabash\.)  &lt;/p&gt; &lt;p&gt;The next step is to create a batch file to run Calabash, runcalabash.bat:&lt;/p&gt;&lt;pre class="code"&gt;@echo off
set CALABASH_HOME="%SCRIPTS%\calabash\calabash.jar"
set SAXON_HOME=%SCRIPTS%\saxon
set APTCUSTOM=%ProgramFiles%\Arbortext5.3\Editor\custom

set RUN_CALABASH=java -Xbootclasspath/p:"%APTCUSTOM%\
classes\resolver.jar";"%APTCUSTOM%\scripts\Framework";
"%SAXON_HOME%\saxon9.jar";"%SAXON_HOME%\saxon9-s9api.jar";
%CALABASH_HOME% com.xmlcalabash.drivers.Main -E
org.apache.xml.resolver.tools.CatalogResolver -U
org.apache.xml.resolver.tools.CatalogResolver

rem Slurp the command line arguments.
set CMD_LINE_ARGS=%1
if ""%1""=="""" goto doneStart
shift
:setupArgs
if ""%1""=="""" goto doneStart
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setupArgs

:doneStart
%RUN_CALABASH% %CMD_LINE_ARGS%&lt;/pre&gt;
&lt;p&gt;You'll need to adjust the first few lines to match the paths in your system.  CALABASH_HOME points to the location of calabash.jar.  SAXON_HOME points to the &lt;a href="http://saxon.sourceforge.net/"&gt;Saxon&lt;/a&gt; jars, which Calabash requires to run.  APTCUSTOM stores the path to my installation of Arbortext Editor, which contains the DTDs of the document types I work with and their XML catalog. If you don't need a catalog resolver, then you can omit this.&lt;/p&gt;
&lt;p&gt;RUN_CALABASH pulls these together, creating the command that launches Calabash with a classpath containing all the java programs we need.  I'm passing it the -E and -U options to activate the URI and entity resolvers, but again, you can leave that out if you want.  &lt;/p&gt;
&lt;p&gt;The next block compensates for the fact that Windows batch files can only take 10 parameters at once.  Lame.  (This code comes from ant.bat distributed with Ant).&lt;/p&gt;
&lt;p&gt;Once that is done, you're ready to run your first pipeline (The following discussion is adapted from &lt;a href="http://xmlcalabash.com/docs/"&gt;Norm's&lt;/a&gt;).  He conveniently provides one with Calabash, so we'll start there.  Here's the pipeline:&lt;/p&gt;&lt;pre class="code"&gt;&amp;lt;p:declare-step xmlns:p="http://www.w3.org/ns/xproc"&amp;gt;
&amp;lt;p:input port="source"&amp;gt;
&amp;lt;p:inline&amp;gt;
 &amp;lt;doc&amp;gt;Congratulations! You've run your first pipeline!&amp;lt;/doc&amp;gt;
&amp;lt;/p:inline&amp;gt;
&amp;lt;/p:input&amp;gt;
&amp;lt;p:output port="result"/&amp;gt;
&amp;lt;p:identity/&amp;gt;
&amp;lt;/p:declare-step&amp;gt;&lt;/pre&gt;
&lt;p&gt;It doesn't do much - just echoes the input.  To run it from the command line, type:&lt;/p&gt;&lt;pre&gt;runcalabash pipe.xpl&lt;/pre&gt;
&lt;p&gt;That's it.  You'll get back:&lt;/p&gt;&lt;pre&gt;&amp;lt;doc xmlns:p="http://www.w3.org/ns/xproc"&amp;gt;
Congratulations! You've run your first pipeline!
&amp;lt;/doc&amp;gt;&lt;/pre&gt;
&lt;p&gt;If you want to direct the output to a file instead of to the command line, you can use the -o flag:&lt;/p&gt;&lt;pre&gt;runcalabash -o "result=out.xml" pipe.xpl&lt;/pre&gt;
&lt;p&gt;Note the quotation marks.  They are necessary because Windows batch files drop "=" when processing parameters.  Again, lame.&lt;/p&gt;
&lt;p&gt;If you want to change the input to a file instead of the inline document, you can use the -i flag:&lt;/p&gt;&lt;pre&gt;runcalabash -i "source=in.xml" -o "result=out.xml" pipe.xpl&lt;/pre&gt;
&lt;p&gt;Finally, if you want to explore on your own, execute runcalabash.bat with no options to get a usage summary.  Next time: an example of a pipeline that's actually useful.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-4849126235499452409?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/cfextDBoxZk" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4849126235499452409?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4849126235499452409?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/cfextDBoxZk/getting-started-with-xproc-and-calabash.html" title="Getting Started With XProc and Calabash on Windows" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/11/getting-started-with-xproc-and-calabash.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIAQXs6eip7ImA9WxRWE0o.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-2650955826727895249</id><published>2008-10-30T09:39:00.000-05:00</published><updated>2008-10-30T09:39:00.512-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-30T09:39:00.512-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="publishing" /><title>Quark Joins XML Party</title><content type="html">&lt;p&gt;I've &lt;a href="http://www.wordsinboxes.com/2008/07/unsolvable-problem.html"&gt;lamented the apparent lack of energy&lt;/a&gt; in the automated XML print publishing market before.&amp;nbsp; Now that Quark, a long-time desktop publishing name, &lt;a href="http://dynamicpublishing.quark.com/dps/why_xml.html"&gt;has announced a new product&lt;/a&gt;, things might be getting more interesting.&amp;nbsp; Details are scarce, but I'm not encouraged by the fact&amp;nbsp; the name includes the word "Solution."&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-2650955826727895249?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/pDSYHoAmhXE" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/2650955826727895249?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/2650955826727895249?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/pDSYHoAmhXE/quark-joins-xml-party.html" title="Quark Joins XML Party" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/10/quark-joins-xml-party.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8DQXsyfCp7ImA9WxdaEko.&quot;"><id>tag:blogger.com,1999:blog-14372968.post-4178629094224624027</id><published>2008-08-20T18:11:00.001-05:00</published><updated>2008-08-20T18:11:10.594-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-20T18:11:10.594-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="geekery" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="emacs" /><category scheme="http://www.blogger.com/atom/ns#" term="utilities" /><title>Emacs</title><content type="html">&lt;p&gt;It's been almost a year since I first talked about my periodic &lt;a href="http://www.wordsinboxes.com/2007/09/too-many-utilities-makes-james-dull-boy.html"&gt;upgrading-the-tools-I-work-with-instead-of-actually-working&lt;/a&gt; kicks.&amp;#160; It's happened again.&amp;#160; This time, the method of my pseudo-procrastination is &lt;a href="http://en.wikipedia.org/wiki/Emacs"&gt;Emacs&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Emacs, for those of you fortunate to have better things to do with your time, is the grandfather of all text editors.&amp;#160; It was originally written in 1976 by &lt;a href="http://en.wikipedia.org/wiki/Richard_Stallman"&gt;Richard Stallman&lt;/a&gt;, who apparently hasn't shaved since:&lt;/p&gt;  &lt;p align="center"&gt;&amp;#160;&lt;a href="http://lh5.ggpht.com/jsulak/SKykhw_5VKI/AAAAAAAAAXw/IOnnWUKNBwE/image2.png?imgmax=800"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="190" alt="image" src="http://lh3.ggpht.com/jsulak/SKykiWNdFnI/AAAAAAAAAX0/yT5Kb1BLqAo/image_thumb.png?imgmax=800" width="190" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Scary guy.&amp;#160; That picture pretty much sums up everything you need to know about Emacs.&amp;#160; That, and the &lt;a href="http://www.gnu.org/philosophy/philosophy.html"&gt;manifestos&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;So why Emacs?&amp;#160; It's not because it's easy to pick up - it's learning curve is more of a learning cliff.&amp;#160; But, if I sit in front of a computer for 8 hours a day, the time I spend learning a difficult can be amortized over hundreds or even thousands of hours.&amp;#160; In this case, usability - the ability for a trained user to be efficient - is much more important than &lt;a href="http://www.codinghorror.com/blog/archives/000376.html"&gt;learnability&lt;/a&gt;.&amp;#160; And Emacs, once learned, is lightning fast. &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/jsulak/SKykjFrNhgI/AAAAAAAAAX4/uGe5sYqIFGI/image5.png?imgmax=800"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="image" src="http://lh5.ggpht.com/jsulak/SKykjgOGJPI/AAAAAAAAAX8/-TyVkteoXh8/image_thumb1.png?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Both its strangeness and speed can be traced back to 1976.&amp;#160; Computing then was very different than it is now.&amp;#160; When Stallman wrote Emacs, the capability to edit lines in a text file in a different order than they existed in the file was a big deal.&amp;#160; There were no personal computers, no mouse, and no arrow keys on keyboards.&amp;#160; Users, mostly university researchers, logged into mainframes using text-only terminals over slow connections.&amp;#160; This result is an interface that is strange and filled with baroque key combinations - you can use CTRL-F to move the cursor to the left - but is above all designed to be fast.&amp;#160; &lt;/p&gt;  &lt;p&gt;Keyboards haven't changed, and neither have people - so a program older than personal computing itself can actually be relevant today.&amp;#160; &lt;/p&gt;  &lt;p&gt;That's not to say there aren't problems.&amp;#160; There are plenty.&amp;#160; It's a free program, developed and extended by volunteers.&amp;#160; It's missing many modern conveniences - such as drop-down Intellisense code-completion - and many of the independent extension efforts seem to have stalled - such as &lt;a href="http://ecb.sourceforge.net/"&gt;ECB&lt;/a&gt; - seem to have stalled several years ago.&amp;#160; It took me about 5 Google searches to find downloadable code to make line numbers show up.&amp;#160; &lt;/p&gt;  &lt;p&gt;For me, the killer feature is progressive search.&amp;#160; Those of you with Firefox already know how it works.&amp;#160; As soon as you start typing your search term, it starts searching.&amp;#160; It's an incredibly fast way to navigate a document, and Emacs does it better than any other program.&amp;#160; Once you use it, navigating a document without it feels like swimming through Jello.&lt;/p&gt;  &lt;p&gt;But really, for many specific applications (such as XSLT debugging), you're much better off using a paid commercial product to work in.&amp;#160; One that was actually written in this decade.&amp;#160; Money actually buys you things, amazingly enough.&lt;/p&gt;  &lt;p&gt;Am I proud of learning it?&amp;#160; Not really.&amp;#160; In the end I might be marginally more productive, but maybe not enough to justify the loss brain real estate now devoted to remembering dozens of strange keyboard combinations.&amp;#160; At this point it's mostly a hobby, something to distract me when I should be doing real work. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14372968-4178629094224624027?l=www.wordsinboxes.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/IndigoFlats/~4/Ec6by0MzOAY" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4178629094224624027?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/14372968/posts/default/4178629094224624027?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/IndigoFlats/~3/Ec6by0MzOAY/emacs.html" title="Emacs" /><author><name>jsulak</name><uri>http://www.blogger.com/profile/05736367413367891531</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10261928563293289544" /></author><feedburner:origLink>http://www.wordsinboxes.com/2008/08/emacs.html</feedburner:origLink></entry></feed>
