<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:smf="http://www.simplemachines.org/xml/modification" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/smf:modification">
<html>
<head>
	<title>Installation Instructions</title>
	<style type="text/css">
		body {
			background-color: #E5E5E8;
			margin: 0px;
			padding: 0px;
			color: #000000;
			font-size: small;
			font-family: "Lucida Grande", Verdana, Arial, sans-serif;
			}
		div#header {
			background-image: url('http://www.fustrate.com/dev/sources/Other/images/catbg.jpg');
			background-repeat: repeat-x;
			background-color: #88A6C0;
			padding: 22px 4% 12px 4%;
			color: white;
			font-size: x-large;
			border-bottom: 1px solid black;
			height: 40px;
			}
		div#content {
			padding: 20px 30px;
			}
		div.error_message {
			border: 2px dashed red;
			background-color: #E1E1E1;
			margin: 1ex 4ex;
			padding: 1.5ex;
			}
		div.panel {
			border: 1px solid gray;
			background-color: #F6F6F6;
			margin: 1ex 0;
			padding: 1.2ex;
			}
		div.panel h1 {
			margin: 0;
			margin-bottom: 2ex;
			padding-bottom: 3px;
			border-bottom: 1px solid black;
			font-size: 14pt;
			font-weight: normal;
			}
		div.panel h2 {
			margin: 0;
			margin-bottom: 0.5ex;
			padding-bottom: 3px;
			border-bottom: 1px dashed black;
			font-size: 14pt;
			font-weight: normal;
			}
		div.panel h3 {
			font-size: 12pt;
			font-weight: bold;
			}
			
		div.panel h4 {
			margin: 0;
			margin-bottom: 2ex;
			font-size: 10pt;
			font-weight: normal;
			}
		pre, blockquote {
			padding: 12px;
			border: 1px dotted #aaaaaa;
			background-color: #dedede;
			overflow: auto;
			margin: 8px;
			}
		pre {
			font-family: "Consolas", "Courier New", monospace;
			}
	</style>
</head>
<body>
<div id="header">
	<a href="http://www.simplemachines.org/" target="_blank"><img border="0" src="http://www.fustrate.com/dev/sources/Other/images/smflogo.gif" style="width: 258px; float: right;" alt="Simple Machines"/></a>
	<div title="O RLY?">Installation Instructions</div>
</div>
<div id="content">
	<div class="panel">
		<p>All errors are fatal unless noted otherwise.</p>
	<xsl:for-each select="smf:file">
		<br />
		<h1><a><xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute><xsl:value-of select="@name" /></a></h1>
		<xsl:choose>

			<xsl:when test="@error = &#34;skip&#34;">
		<b>Skip any errors encountered in this file.</b><br />
			</xsl:when>

			<xsl:when test="@error = &#34;ignore&#34;">
		<b>Can't find it? Create it!</b><br />
			</xsl:when>

		</xsl:choose>
		<ol>
		<xsl:for-each select="smf:operation">
			<li>
				<xsl:choose>

					<xsl:when test="@error = &#34;ignore&#34;">
				<b>Ignore any errors encountered in this operation.</b><br />
					</xsl:when>

					<xsl:when test="@error = &#34;required&#34;">
				<b>This operation will fail.</b><br />
					</xsl:when>

				</xsl:choose>

				<xsl:if test="@regexp = &#34;true&#34;">
				This is a regular expression search!<br />
				</xsl:if>

				<xsl:for-each select="smf:search">
					<xsl:choose>

						<xsl:when test="@position = &#34;end&#34;">
				Add the following to the end of the file. If there is a ?> on the last line, add this on the line <u>before</u> it.<br />
						</xsl:when>

						<xsl:when test="@position = &#34;replace&#34;">
				Find the following:<br />
				<pre><xsl:value-of select="current()" /></pre>
				and replace it with:<br />
						</xsl:when>

						<xsl:when test="@position = &#34;before&#34;">
				Find the following:<br />
				<pre><xsl:value-of select="current()" /></pre>
				and add this <u>after</u> it:<br />
						</xsl:when>

						<xsl:when test="@position = &#34;after&#34;">
				Find the following:<br />
				<pre><xsl:value-of select="current()" /></pre>
				and add this <u>before</u> it:<br />
						</xsl:when>

					</xsl:choose>
				</xsl:for-each>
				<pre><xsl:value-of select="smf:add" /></pre>
			</li>
		</xsl:for-each>
		</ol>
	</xsl:for-each>
		<h1>Common SMF Variables</h1>
		<ul>
			<li><b>$sourcedir</b> - usually /Sources/</li>
			<li><b>$themedir</b> - do this for every theme in /Themes/</li>
			<li><b>$imagesdir</b> - your theme's /images/ folder</li>
			<li><b>$avatardir</b> - usually /avatars/</li>
			<li><b>$boarddir</b> - your forum's main directory</li>
			<li><b>$languagedir</b> - usually /Themes/default/languages/</li>
		</ul>
	</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>