<?xml version="1.0"?>
<?xml-stylesheet type="text/xml" href="presenter.xsl"?>
<slideshow>
	<title>XSLT is a Programming Language, Goddamnit</title>
	<slide>
		<title>XSLT is a Programming Language, Goddamnit</title>
		<body>
			<p><em>Dispelling Misconceptions About XSLT</em></p>
			<p>By Karl Voelker</p>
		</body>
	</slide>

<slide>
<title>What is XSLT?</title>
<body>
<p><em>XSLT is a programming language for manipulating XML.</em></p>
<p>That's it.</p>
</body>
</slide>

<slide>
<title>Agenda</title>
<body>
<ol>
<li style='color:red'>Common objections and misconceptions</li>
<li>Cool features</li>
</ol>
</body>
</slide>

<slide>
<title>...but I'm not making a web site!</title>
<body>
<p>That's okay.</p>
<p>The output of an XSLT program doesn't have to be HTML.</p>
<p>It doesn't even have to be XML!</p>
<p>Let's see an example:</p>
</body>
</slide>

<slide>
<title>Example: Tables</title>
<body>
<pre><include href="examples/tables.xsl" mode="show"/></pre>
</body>
</slide>

<slide>
<title>Web browsers are icky!</title>
<body>
<p>Luckily, there are plenty of stand-alone XSLT 
implementations:</p>
<ul>
<li><a href='http://saxon.sourceforge.net/'>Saxon</a></li>
<li><a href='http://xml.apache.org/xalan-c/'>Xalan</a></li>
<li><a href='http://xmlsoft.org/XSLT/xsltproc2.html'>xsltproc</a></li>
</ul>
</body>
</slide>

<slide>
<title>XSLT is hard to debug!</title>
<body>
<p>Debugging anything in a web browser is a chore.</p>
<p>So, <em>don't debug in a web browser!</em></p>
<p>Command-line XSLT processors give helpful error messages.</p>
</body>
</slide>

<slide>
<title>XSLT isn't a programming language!</title>
<body>
<p>Well, you're wrong.</p>
<p>XSLT is <a href='http://www.idealliance.org/papers/extreme/proceedings//html/2004/Kepser01/EML2004Kepser01.html'>Turing-complete</a>.</p>
<p>Should you use XSLT when there's no XML involved?</p>
<p>Probably not. <em>But you could!</em></p>
</body>
</slide>

<slide>
<title>Agenda</title>
<body>
<ol>
<li>Common objections and misconceptions</li>
<li style='color:red'>Cool features</li>
</ol>
</body>
</slide>

<slide>
<title>Look Around You</title>
<body>
<p>An XSLT processor does have a "current location" in the document 
	which changes as it goes along.</p>
<p>But, you can easily examine far-flung parts of 
	the document with the various XPath axes:</p>
<pre><show-xml>
<xsl:template match="/somewhere/in/the/tree" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:if test="/somewhere-else/in/the/tree">
		<p>foo</p>
	</xsl:if>
</xsl:template>
</show-xml></pre>
</body>
</slide>

<slide>
<title>Get Outside</title>
<body>
<p>You're not restricted to one input document.</p>
<p>An XSLT program can obtain other documents by URL.</p>
<p>It can even determine 
the filenames to fetch dynamically.</p>
</body>
</slide>

<slide>
<title>Dirty Tricks with Apache</title>
<body>
<p>If you configure Apache like this:</p>
<pre>IndexOptions +XHTML</pre>
<p>Then you can download directory indices and examine them on the client!</p>
</body>
</slide>

<slide>
<title>Supertemplates</title>
<body>
<p>XSLT "templates" are more like functions than templates. You can:</p>
<ul>
<li>Call a template by name or with advanced pattern matching</li>
<li>Call templates recursively</li>
<li>Pass arguments to a template</li>
</ul>
</body>
</slide>

<slide>
<title>The End</title>
<body>
<p>Questions?</p>
</body>
</slide>

</slideshow>
