<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:smf="http://www.simplemachines.org/xml/package-info" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/smf:package&#45;info">
<html>
<head>
	<title><xsl:value-of select="smf:name" /> v<xsl:value-of select="smf:version" /></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?"><xsl:value-of select="smf:name" /> v<xsl:value-of select="smf:version" /></div>
</div>
<div id="content">
	<div class="panel">
	<xsl:for-each select="smf:install">
		<h1>To install 
		<xsl:if test="@for">
			on <b>SMF <xsl:value-of select="@for" /></b>
		</xsl:if>
		</h1>
		<ul>

			<xsl:for-each select="smf:error">
				<li><b style="color: red;">This modification cannot be installed on this version of SMF.</b></li>
			</xsl:for-each>

			<xsl:for-each select="smf:readme">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Read the readme file:
					<blockquote><xsl:value-of select="current()" /></blockquote>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Read the readme file in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:code">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Execute the following code:
					<pre><xsl:value-of select="current()" /></pre>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Execute the code found in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:modification">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Do the following edits:
					<pre><xsl:value-of select="current()" /></pre>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Do the edits found in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:database">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Execute the following database-related code:
					<pre><xsl:value-of select="current()" /></pre>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Execute the database-related code found in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:create&#45;dir">
				<li>Create an empty folder named <tt><xsl:value-of select="@name" /></tt> in <tt><xsl:value-of select="@destination" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:create&#45;file">
				<li>Create a blank file named <tt><xsl:value-of select="@name" /></tt> in <tt><xsl:value-of select="@destination" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:remove&#45;dir">
				<li>Remove the entire folder located at <tt><xsl:value-of select="@name" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:remove&#45;file">
				<li>Delete the file at <tt><xsl:value-of select="@name" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:require&#45;dir">
				<li>
					Move the folder in this package named 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:require&#45;file">
				<li>
					Move the file in this package named 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:move&#45;dir">
				<li>
					Move the folder located at 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:move&#45;file">
				<li>
					Move the file located at 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:redirect">
				<li>
					Finally, redirect your browser to http://{your forum's url}/index.php<xsl:value-of select="@url" /> 

				<xsl:choose>
				<xsl:when test="@type = &#34;inline&#34;">
					and read the author's last words:
					<blockquote><xsl:value-of select="current()" /></blockquote>
				</xsl:when>

				<xsl:otherwise>
					and read the author's last words in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

		</ul>
	</xsl:for-each>

	<xsl:for-each select="smf:uninstall">
		<h1>To uninstall 
		<xsl:if test="@for">
			on <b>SMF <xsl:value-of select="@for" /></b>
		</xsl:if>
		</h1>
		<ul>

			<xsl:for-each select="smf:error">
				<li><b style="color: red;">This modification cannot be uninstalled on this version of SMF.</b></li>
			</xsl:for-each>

			<xsl:for-each select="smf:readme">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Read the readme file:
					<blockquote><xsl:value-of select="current()" /></blockquote>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Read the readme file in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:code">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Execute the following code:
					<pre><xsl:value-of select="current()" /></pre>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Execute the code found in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:modification">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					REVERSE the following edits:
					<pre><xsl:value-of select="current()" /></pre>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>REVERSE the edits found in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:database">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Execute the following database-related code:
					<pre><xsl:value-of select="current()" /></pre>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Execute the database-related code found in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:create&#45;dir">
				<li>Create an empty folder named <tt><xsl:value-of select="@name" /></tt> in <tt><xsl:value-of select="@destination" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:create&#45;file">
				<li>Create a blank file named <tt><xsl:value-of select="@name" /></tt> in <tt><xsl:value-of select="@destination" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:remove&#45;dir">
				<li>Remove the entire folder located at <tt><xsl:value-of select="@name" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:remove&#45;file">
				<li>Delete the file at <tt><xsl:value-of select="@name" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:require&#45;dir">
				<li>
					Move the folder in this package named 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:require&#45;file">
				<li>
					Move the file in this package named 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:move&#45;dir">
				<li>
					Move the folder located at 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:move&#45;file">
				<li>
					Move the file located at 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:redirect">
				<li>
					Finally, redirect your browser to http://{your forum's url}/index.php<xsl:value-of select="@url" /> 

				<xsl:choose>
				<xsl:when test="@type = &#34;inline&#34;">
					and read the author's last words:
					<blockquote><xsl:value-of select="current()" /></blockquote>
				</xsl:when>

				<xsl:otherwise>
					and read the author's last words in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

		</ul>
	</xsl:for-each>

	<xsl:for-each select="smf:upgrade">
		<h1>To upgrade from <b>v<xsl:value-of select="@from" /></b> 
		<xsl:if test="@for">
			on <b>SMF <xsl:value-of select="@for" /></b>
		</xsl:if>
		</h1>
		<ul>

			<xsl:for-each select="smf:error">
				<li><b style="color: red;">This modification cannot be upgraded from this version.</b></li>
			</xsl:for-each>

			<xsl:for-each select="smf:readme">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Read the readme file:
					<blockquote><xsl:value-of select="current()" /></blockquote>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Read the readme file in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:code">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Execute the following code:
					<pre><xsl:value-of select="current()" /></pre>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Execute the code found in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:modification">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Do the following edits:
					<pre><xsl:value-of select="current()" /></pre>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Do the edits found in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:database">
				<xsl:choose>

				<xsl:when test="@type = &#34;inline&#34;">
				<li>
					Execute the following database-related code:
					<pre><xsl:value-of select="current()" /></pre>
				</li>
				</xsl:when>

				<xsl:otherwise>
				<li>Execute the database-related code found in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a></li>
				</xsl:otherwise>

				</xsl:choose>
			</xsl:for-each>

			<xsl:for-each select="smf:create&#45;dir">
				<li>Create an empty folder named <tt><xsl:value-of select="@name" /></tt> in <tt><xsl:value-of select="@destination" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:create&#45;file">
				<li>Create a blank file named <tt><xsl:value-of select="@name" /></tt> in <tt><xsl:value-of select="@destination" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:remove&#45;dir">
				<li>Remove the entire folder located at <tt><xsl:value-of select="@name" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:remove&#45;file">
				<li>Delete the file at <tt><xsl:value-of select="@name" /></tt></li>
			</xsl:for-each>

			<xsl:for-each select="smf:require&#45;dir">
				<li>
					Move the folder in this package named 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:require&#45;file">
				<li>
					Move the file in this package named 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:move&#45;dir">
				<li>
					Move the folder located at 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:move&#45;file">
				<li>
					Move the file located at 

				<xsl:choose>
				<xsl:when test="@from">
					<tt><xsl:value-of select="@from" /></tt> to <tt><xsl:value-of select="@destination" /></tt> and rename it <tt><xsl:value-of select="@name" /></tt>
				</xsl:when>

				<xsl:otherwise>
					<tt><xsl:value-of select="@name" /></tt> to <tt><xsl:value-of select="@destination" /></tt>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

			<xsl:for-each select="smf:redirect">
				<li>
					Finally, redirect your browser to http://{your forum's url}/index.php<xsl:value-of select="@url" /> 

				<xsl:choose>
				<xsl:when test="@type = &#34;inline&#34;">
					and read the author's last words:
					<blockquote><xsl:value-of select="current()" /></blockquote>
				</xsl:when>

				<xsl:otherwise>
					and read the author's last words in <a><xsl:attribute name="href"><xsl:value-of select="current()" /></xsl:attribute><xsl:value-of select="current()" /></a>
				</xsl:otherwise>
				</xsl:choose>

				</li>
			</xsl:for-each>

		</ul>
	</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>