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

<channel>
	<title>El Tramo &#187; DocBook XSL</title>
	<atom:link href="http://el-tramo.be/blog/tag/docbook-xsl/feed" rel="self" type="application/rss+xml" />
	<link>http://el-tramo.be</link>
	<description>Remko Tronçon&#039;s Homepage</description>
	<lastBuildDate>Fri, 11 Jun 2010 19:08:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Integrating DocBook with WordPress</title>
		<link>http://el-tramo.be/blog/integrating-docbook-with-wordpress</link>
		<comments>http://el-tramo.be/blog/integrating-docbook-with-wordpress#comments</comments>
		<pubDate>Sat, 27 Jun 2009 18:28:36 +0000</pubDate>
		<dc:creator>Remko Tronçon</dc:creator>
				<category><![CDATA[Writing]]></category>
		<category><![CDATA[DocBook]]></category>
		<category><![CDATA[DocBook Kit]]></category>
		<category><![CDATA[DocBook XSL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://el-tramo.be/?p=409</guid>
		<description><![CDATA[I added a DocBook XSL customization layer to my DocBook Kit that outputs an HTML/PHP version of the document that automatically integrates with a WordPress blog. The stylesheet also (optionally) adds a link to the downloadable PDF of the document. An example document integrating with this blog can be seen here.
The custom stylesheet is based [...]]]></description>
			<content:encoded><![CDATA[<p>I added a DocBook XSL <a href="/git/docbook-kit/tree/style/wordpress">customization layer</a> to my <a href="/blog/docbook-kit">DocBook Kit</a> that outputs an HTML/PHP version of the document that automatically integrates with a WordPress blog. The stylesheet also (optionally) adds a link to the downloadable PDF of the document. An example document integrating with this blog can be seen <a href="/documents/example/index.php">here</a>.</p>
<p><span id="more-409"></span>The custom stylesheet is based on the standard DocBook XSL XHTML stylesheet. However, instead of inserting an HTML header, it inserts PHP calls to include the WordPress headers and footers. The only tricky part of this is to tell WordPress what the title of the resulting page should be. I hacked this in by creating a class with the bare minimum fields required by <code>wp_title() </code>(which is used by WordPress to print the title of the document). The resulting template looks like this:</p>
<blockquote>
<pre>&lt;?php
  require('../wordpress/wp-blog-header.php');
  class MyPost { var $post_title = "My Title"; }
  $wp_query-&gt;is_home = false;
  $wp_query-&gt;is_single = true;
  $wp_query-&gt;queried_object = new MyPost();
  get_header();
?&gt;
&lt;div id="content" class="narrowcolumn" role="main"&gt;
  ...
&lt;/div&gt;
&lt;?php
  get_sidebar();
  get_footer();
?&gt;</pre>
</blockquote>
<p>The DocBook kit is available from my <a href="/git/docbook-kit">Git repository</a> (or on <a href="http://github.com/remko/docbook-kit">GitHub</a>, or as a <a href="/git/docbook-kit/snapshot/docbook-kit-master.zip">ZIP</a> file). More information about the kit can be found <a href="/blog/docbook-kit">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://el-tramo.be/blog/integrating-docbook-with-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
