<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet>
<!-- 
VARIABLE DEBUG for Schoolname 2013 Implementation
A useful XSL for variable reference, testing, &amp; debugging 

Contributors: Your Name Here
Last Updated 4/2013
-->
<xsl:stylesheet version="3.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:ou="http://omniupdate.com/XSL/Variables"
    xmlns:fn="http://omniupdate.com/XSL/Functions"
    xmlns:ouc="http://omniupdate.com/XSL/Variables"
    exclude-result-prefixes="ou xsl xs fn ouc">
		
<xsl:import href="common.xsl"/>
		
<xsl:template name="debug" match="/">	

<xsl:if test="$ou:action!='pub'">
<html>
	<head>
		<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"/>
		<link href="/_resources/css/oustaging.css" rel="stylesheet" />
	</head>
	<body id="debug">
		<div class="row ou silver">
			<div class="container">
			<h1>Variable Debug Tab</h1>
				<p>The following is a list of XSL variables for this page or section for debugging and development purposes. 
				Feel free to add your own (globally defined) variables here. This page depends on the import of any XSL in which variables are
				defined, such as ouvariables, vars, and common XSL stylesheets.</p>
				<p><em>This screen will not be published.</em></p>
				<div class="row">
					<div class="span6 left">
						<h3>OUCampus System Variables</h3>
						<p>These are parameters provided by the system, instantiated in vars.xsl</p>
						<h4>File/Directory</h4><em>Page or directory specific</em>
						<dl>
							<xsl:copy-of select="ou:displayVariable('ou:filename',$ou:filename)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:path',$ou:path)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:created',$ou:created)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:modified',$ou:modified)"/>
							<xsl:copy-of select="ou:displayVariable('ou:feed',$ou:feed)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:dirname',$ou:dirname)"/>
						</dl>
						<!-- protected information -->
						
						<h5>Staging</h5><em>Site specific, staging server information</em>
						<dl>
							<xsl:copy-of select="ou:displayVariable('ou:action',$ou:action)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:root',$ou:root)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:site',$ou:site)"/>	
						</dl>
						<xsl:if test="contains($ou:username,'omni')">
						<h5>Production</h5><em>Site specific, production server informaiton</em>
						<dl>
						
							<xsl:copy-of select="ou:displayVariable('ou:ftphome',$ou:ftphome)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:ftpdir',$ou:ftpdir)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:httproot',$ou:httproot)"/>	
							<xsl:copy-of select="ou:displayVariable('domain',$domain)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:ftproot',$ou:ftproot)"/>	
						</dl>
						</xsl:if>
					
						<h4>User</h4><em>User specific information, if available</em>
						<dl>
							<xsl:copy-of select="ou:displayVariable('ou:username',$ou:username)"/>	
							<xsl:copy-of select="ou:displayVariable('ou:firstname',$ou:firstname)"/>
							<xsl:copy-of select="ou:displayVariable('ou:lastname',$ou:lastname)"/>		
							<xsl:copy-of select="ou:displayVariable('ou:email',$ou:email)"/>	
						</dl>					
					</div>
					<div class="span6 right">
						<h3>Implementation Specific Variables</h3>
						<p>These are variables and parameters defined globally specific to this project.</p>
						<h4>Skeleton Variables</h4><em>Standard variable set</em>
						<dl>
						<xsl:copy-of select="ou:displayVariable('Page Type',$pageType)"/>	
						<xsl:copy-of select="ou:displayVariable('Page Title',$pageTitle)"/>	
						<xsl:copy-of select="ou:displayVariable('dirname',$dirname)"/>	
						<xsl:copy-of select="ou:displayVariable('path',$path)"/>	
						<xsl:copy-of select="ou:displayVariable('Props File',$props-file)"/>	
						<xsl:copy-of select="ou:displayVariable('Props Path',$props-path)"/>	
						</dl>
						<h4>Schoolname Variables</h4>
						<p><em>Variables based off of Filename/Foldername logic, Page Properties, Directory Variables, or a combination of all three.</em></p>
						<p><em>You can also use this area as a playground when coming up with variables.</em></p>
					</div>
				</div>

			</div>
		</div>
	</body>
</html>

</xsl:if>
</xsl:template>

<!-- display a variable for debug purposes -->
<xsl:function name="ou:displayVariable">
<xsl:param name="name"/> <xsl:param name="var"/>
<dt><xsl:value-of select="$name"/></dt> <dd><xsl:value-of select="$var"/></dd>
</xsl:function>



</xsl:stylesheet>
