<?xml version="1.0" encoding="ISO-8859-1"?>
<opml version="2.0">
<head>
<title>15.opml</title>
<dateCreated>Tue, 15 Apr 2008 10:30:27 GMT</dateCreated>
<dateModified>Tue, 15 Apr 2008 19:06:49 GMT</dateModified>
<ownerName>Tom Morris</ownerName>
</head>
<body><outline text="There's a good excellent &lt;em&gt;Ethics Bites&lt;/em&gt; &lt;a href=&quot;http://open2.net/ethicsbites/copyright.html&quot;&gt;interview with Richard Posner&lt;/a&gt; on copyright and plagiarism." created="Tue, 15 Apr 2008 19:06:49 GMT"/><outline text="The DataPortability.org folks are trying to figure out their new logo. Public voting is &lt;a href=&quot;http://dataportability.techcrunch.com/&quot;&gt;now open&lt;/a&gt;. I voted for the logos titled with &quot;ics2626&quot; and &quot;phil.franks46&quot;. Strangely, after I voted, I didn't seem to get any feedback telling me that I had. If it were a parliamentary election rather than a logo contest on the Web, it'd be time to get concerned." created="Tue, 15 Apr 2008 18:07:55 GMT"/><outline text="Just watching &lt;a href=&quot;http://richarddawkins.net/article,2472,n,n&quot;&gt;Richard Dawkins and Lawrence Krauss&lt;/a&gt; discussing evolution, quantum mechanics, science education, religion and tactics in the war against intellectual ineptitude." created="Tue, 15 Apr 2008 14:04:12 GMT"/><outline text="&lt;a href=&quot;http://londonist.com/2008/04/god_on_the_buse.php&quot;&gt;Londonist&lt;/a&gt; is reporting that God botherers will now be on London buses. Great. Now we have two problems." created="Tue, 15 Apr 2008 13:52:51 GMT"/><outline text="&lt;a href=&quot;http://nolobe.com/interarchy/&quot; rev=&quot;vote-for&quot;&gt;Interarchy&lt;/a&gt;, my favourite &lt;acronym title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/acronym&gt; client, has been updated. I really didn't like Interarchy 9, since it seemed to want me to open everything in TextEdit. It's &lt;a href=&quot;http://nolobe.com/interarchy/releasenotes/&quot;&gt;been updated&lt;/a&gt; so it works properly." created="Tue, 15 Apr 2008 11:48:48 GMT"/><outline text="What, you want &lt;a href=&quot;http://www.mediawatchwatch.org.uk/?p=1000&quot;&gt;consistency&lt;/a&gt; from right-wing culture warriors? They are too busy &lt;a href=&quot;http://scienceblogs.com/dispatches/2008/04/wnds_laughable_review_of_bible.php&quot;&gt;fighting off Hegel and confusing nineteenth-century Russian novelists for communists&lt;/a&gt; and &lt;a href=&quot;http://www.bibleliteracy.org/site/PressRoom/press080411Response.htm&quot;&gt;lying for Jesus&lt;/a&gt;. Then there's that &lt;a href=&quot;http://expelledexposed.com&quot; rev=&quot;vote-for&quot;&gt;Expelled&lt;/a&gt; rubbish still rolling on. Just remember, God's will is not discernible to science, but perfectly understandable if you are a Professor of Theology. Time to bang one's head against a desk in frustration? Yeah, getting close." created="Tue, 15 Apr 2008 11:24:14 GMT"/>
<outline text="Publishing XHTML with Webby, Rake and Apache" created="Tue, 15 Apr 2008 10:30:27 GMT"><outline text="I've been rewriting my static site in &lt;a href=&quot;http://webby.rubyforge.org&quot; rev=&quot;vote-for&quot;&gt;Webby&lt;/a&gt;, a Ruby static website management system. Hopefully, if it all works, you won't notice. The only way you'll notice is if you peek under the hood. I'm using &quot;Options +MultiViews&quot; in Apache to do URL rewriting, and there'll be more about that later.&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="Using Webby is pretty easy: &lt;code&gt;webby site-name&lt;/code&gt; makes a new folder. Inside, there's a &lt;samp&gt;content/&lt;/samp&gt; folder where you can put your content. These are .txt files which contain some &lt;abbr class=&quot;recursive&quot; title=&quot;YAML Ain't A Markup Language&quot;&gt;YAML&lt;/abbr&gt; to include the title, what &lt;em&gt;filters&lt;/em&gt; it runs through (&lt;abbr title=&quot;Embedded Ruby&quot;&gt;ERb&lt;/abbr&gt; and &lt;a href=&quot;http://hobix.com/textile/&quot;&gt;Textile&lt;/a&gt; for instance) and what layout it uses.&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="It comes with &lt;a href=&quot;http://rake.rubyforge.org/&quot; rev=&quot;vote-for&quot;&gt;Rake&lt;/a&gt; tasks to build and deploy. Here's how I'm using mine. The basic procedure is &lt;kbd&gt;rake build&lt;/kbd&gt; and then &lt;kbd&gt;rake deploy&lt;/kbd&gt; to &lt;abbr title=&quot;Secure Copy&quot;&gt;SCP&lt;/abbr&gt; or &lt;a href=&quot;http://samba.anu.edu.au/rsync/&quot;&gt;rsync&lt;/a&gt; it to your server (I use &lt;abbr&gt;SCP&lt;/abbr&gt;). I've introduced another step - &lt;kbd&gt;rake validate&lt;/kbd&gt;.&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="What does the validate task do? Well, the validation I'm doing is using &lt;a href=&quot;http://www.oxygenxml.com/onvdl.html&quot;&gt;oNVDL&lt;/a&gt;, which is a Java tool to validate &lt;abbr title=&quot;Extensible Markup Language&quot;&gt;XML&lt;/abbr&gt;. I'm using &lt;a href=&quot;http://www.thaiopensource.com/relaxng/xhtml/&quot;&gt;James Clark's &lt;abbr title=&quot;Extensible HyperText Markup Language&quot;&gt;XHTML&lt;/abbr&gt; modular schema&lt;/a&gt;, specifically xhtml-strict.rng. There is a downside with this approach, and one I'll probably fix soon - that is, if you use a mixture of HTML 4 and XHTML, or you use different types of &lt;abbr&gt;XHTML&lt;/abbr&gt; - either 1.0 and 1.1, or Strict and Transitional, or even the new modular DTDs that the W3C have put out for &lt;abbr title=&quot;Scalable Vector Graphics&quot;&gt;SVG&lt;/abbr&gt; and RDFa. The reason I used the RELAX NG schema is because I had it there and was in a hurry, I knew how to use oNVDL and I'd used the modular RNG schemas before.&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="The Rake task is quite simple:&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="&lt;code&gt;desc 'validate XHTML'&lt;br /&gt;task :validate do&lt;br /&gt;&amp;nbsp;&amp;nbsp;Dir.glob('output/**/*.html').each do |f|&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print &quot;validating &quot; + f + &quot;\n&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sh &quot;java -jar /Applications/oxygen/lib/onvdl.jar /Users/tommorris/bin/xhtmlrng/xhtml-strict.rng &quot; + f&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print &quot;\n&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;end&lt;br /&gt;end&lt;/code&gt;&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="This will iterate through your output folder (the place where built markup goes) and validates each one against the schema. It should also print the result to your screen. You'll see nothing if it's all good, but you'll get errors like this otherwise: &lt;samp&gt;/Users/tommorris/code/HTML/test/output/profiles/nsfw.html:3:71: error: attribute &quot;lang&quot; not allowed at this point; ignored&lt;/samp&gt;&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="The nice thing is that the Java process exits with status 1 if there are problems, meaning the rake task itself is aborted. You can then fix one error at a time. And you can also make your deployment (or repository commit) dependent on the whole site validating. Hey, it's &lt;em&gt;compile-time&lt;/em&gt; error checking for &lt;abbr&gt;XHTML&lt;/abbr&gt;! I'm sure some people are now furious since &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; is Not A Programming Language, but for me, this is important. I want my computer to tell me when things go wrong, and prevent me from sending invalid markup out on to the web. I'm sure one could even replace the validator with a stricter one that does some basic accessibility tests - and it'd be neat if we could add similar tests for &lt;acronym title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/acronym&gt; and so on.&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="Once you validate all the markup as &lt;abbr&gt;XHTML&lt;/abbr&gt;, you probably want to then get Apache to serve the files as application/xhtml+xml, but not do so when Internet Explorer comes knocking on your door, since Internet Explorer is so utterly shite that it can't read &lt;abbr&gt;XHTML&lt;/abbr&gt; properly. Adding the following to your .htaccess file does exactly that:&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="&lt;code&gt;RewriteEngine on&lt;br /&gt;AddType application/xhtml+xml html&lt;br /&gt;RewriteCond %{HTTP_USER_AGENT} ((.*MSIE.*)|(Lynx.*))&lt;br /&gt;RewriteRule .* - [T=text/html]&lt;/code&gt;&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="This will serve all your .html files as &lt;abbr&gt;XHTML&lt;/abbr&gt;, unless Internet Explorer or Lynx is being used, in which case it should get text/html instead. XHTML 1.0 can be served as application/xhtml+xml or text/html - but if you are using &lt;abbr&gt;XHTML&lt;/abbr&gt; 1.1, or maybe the custom XHTML+RDFa &lt;acronym title=&quot;Document Type Definition&quot;&gt;DTD&lt;/acronym&gt;, then the validator and specification says you should be serving it as application/xhtml+xml. It's probably okay if you still allow people using retarded browsers like Internet Explorer get your &lt;abbr&gt;XHTML&lt;/abbr&gt; as text/html though.&#13;" created="Tue, 15 Apr 2008 10:30:27 GMT"/><outline text="By the way, one last thing - I mentioned earlier in passing 'repository commit'. If you are using &lt;a href=&quot;http://git.or.cz&quot; rev=&quot;vote-for&quot;&gt;Git&lt;/a&gt; to manage your Webby sites (and frankly, you should be, since Git is made of win), you should &lt;em&gt;not&lt;/em&gt; check your output directory in. Just add &lt;code&gt;output/*&lt;/code&gt; to .gitignore. I'd highly recommend keeping your static site in version control. It's very useful to be able to roll your site back, or get a list of all the changes you made to the template or the &lt;acronym&gt;CSS&lt;/acronym&gt;..." created="Tue, 15 Apr 2008 10:30:27 GMT"/></outline></body>
</opml>
