<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY amp   "&#38;">
<!ENTITY copy   "&#169;">
<!ENTITY gt   "&#62;">
<!ENTITY hellip "&#8230;">
<!ENTITY laquo  "&#171;">
<!ENTITY lsaquo   "&#8249;">
<!ENTITY lsquo   "&#8216;">
<!ENTITY lt   "&#60;">
<!ENTITY nbsp   "&#160;">
<!ENTITY quot   "&#34;">
<!ENTITY raquo  "&#187;">
<!ENTITY rsaquo   "&#8250;">
<!ENTITY rsquo   "&#8217;">
]>

<!--
Implementation Skeleton - 10/09/2018

Common XSL
Imported by all page type-specific stylesheets, and imports utility stylesheets.
Defines html, xsl templates and functions used globally throughout the implementation
Defines outer html structure and common include content.
-->

<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="xsl xs ou fn ouc">

	<xsl:import href="/var/staging/OMNI-INF/stylesheets/implementation/v1/template-matches.xsl"/> <!-- global template matches -->
	<xsl:import href="/var/staging/OMNI-INF/stylesheets/implementation/v1/variables.xsl"/> <!-- global variables -->
	<xsl:import href="/var/staging/OMNI-INF/stylesheets/implementation/v1/functions.xsl"/> <!-- global functions -->
	<xsl:import href="/var/staging/OMNI-INF/stylesheets/implementation/v1/breadcrumb.xsl"/> <!-- global breadcrumb functionality -->
	<xsl:import href="/var/staging/OMNI-INF/stylesheets/implementation/v1/standard-outputs.xsl"/> <!-- global standard outputs -->
	<xsl:import href="/var/staging/OMNI-INF/stylesheets/implementation/v1/click-tips.xsl"/> <!-- global click tips -->
	<xsl:import href="/var/staging/OMNI-INF/stylesheets/implementation/v1/social-meta-tag-output.xsl"/> <!-- global social meta tags -->
	<xsl:import href="/var/staging/OMNI-INF/stylesheets/implementation/v1/components.xsl"/> <!-- global component code -->
	<xsl:import href="_dmc/_core/functions.xsl"/> <!-- enable dmc functionality -->
	<xsl:import href="_shared/variables.xsl"/> <!-- customer variables -->
	<xsl:import href="_shared/snippets.xsl"/> <!-- customer snippets -->
	<xsl:import href="_shared/components.xsl"/> <!-- customer snippets -->
	<xsl:import href="_shared/functions.xsl"/> <!-- customer functions -->
	<xsl:import href="_shared/breadcrumb.xsl"/> <!-- customer breadcrumb functionality -->
	<xsl:import href="_shared/forms.xsl"/>
	<xsl:import href="_shared/galleries.xsl"/>
	<!-- HTML5 Declaration -->
	<xsl:output method="html" version="5.0" indent="yes" encoding="UTF-8" include-content-type="no"/>

	<xsl:template match="/document">
		<html lang="en">
			<head>
				<meta charset="UTF-8" /> <!-- charset encoding -->
				<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
				<title><xsl:value-of select="$page-title"/></title> <!-- page title -->
				<xsl:if test="$is-pub">
					<link rel="canonical" href="{$page-pub-path}" /> <!-- canonical -->
				</xsl:if>
				<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <!-- viewport -->
				<xsl:call-template name="pcf-meta-data-output" /> <!-- copy meta tags from pcf, but only those with content -->
				<xsl:call-template name="common-headcode"/> <!-- common headcode scripts for the <head> -->
				<xsl:call-template name="template-headcode"/> <!-- each xsl has a unique version of this template -->
				<xsl:apply-templates select="headcode/node()"/> <!-- pcf -->
				<xsl:call-template name="ou-click-tip-css"/> <!-- css class for click tips -->
				<xsl:call-template name="editor-plugins-css"/>
				<xsl:call-template name="full-social-meta-tag-output" /> <!-- social meta tag output -->
			</head>
			<body class="no-js">
				<xsl:call-template name="common-bodycode" /> <!-- common body scripts for the start of <body> -->
				<xsl:call-template name="template-bodycode"/> <!-- each xsl has a unique version of this template -->
				<xsl:apply-templates select="bodycode/node()"/> <!-- pcf -->
				<main class="main-global">
					<xsl:call-template name="common-header"/> <!-- site header -->
					<xsl:call-template name="hero" />
					<xsl:call-template name="page-content"/> <!-- each xsl has a unique version of this template -->
				</main>
				<xsl:call-template name="common-footer"/> <!-- site footer -->
				<xsl:call-template name="common-footcode"/> <!-- common footcode scripts -->
				<xsl:call-template name="direct-edit"/> <!-- outputs the direct edit OU Campus object and direct-edit js -->
				<xsl:call-template name="template-footcode"/> <!-- each xsl has a unique version of this template -->
				<xsl:apply-templates select="footcode/node()"/> <!-- pcf -->
				<xsl:call-template name="ou-click-tip-modal"/> <!-- click tip modal -->
				<xsl:call-template name="editor-plugins-js"/>
			</body>
		</html>
	</xsl:template>

	<xsl:template name="hero" expand-text="yes">
		<div class="hero-global hero-global-right" style="background-image: url('{ou:pcf-param('background-image')}');">
			<div class="hero-global-mask"></div>
			<div class="hero-global-navigation">
				<div class="menu-global-insert"></div>
			</div>
			<div class="hero-global-content">
				<div class="container">
					<div class="row">
						<div class="col-12">
							<div class="hgroup">

								<xsl:if test="ou:pcf-param('heading') != ''">
									<h1>{ou:pcf-param('heading')}</h1>
								</xsl:if>


							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</xsl:template>

	<xsl:template name="common-bodycode">
		<xsl:call-template name="output-include">
			<xsl:with-param name="path">/_resources/includes/bodycode.inc</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<xsl:template name="common-headcode">
		<xsl:call-template name="output-include">
			<xsl:with-param name="path">/_resources/includes/headcode.inc</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="gallery-headcode" />
		<xsl:call-template name="form-headcode" />
	</xsl:template>

	<xsl:template name="common-header">
		<header class="header-global"></header>
		<div class="navigation-mobile"></div>
	</xsl:template>

	<xsl:template name="common-footer">
		<footer class="footer-global"></footer>
		<!-- <span id="directedit">&copy;</span> -->
	</xsl:template>

	<xsl:template name="direct-edit-script" expand-text="no">
		<script>
			document.addEventListener('DOMContentLoaded', function() {

				setTimeout(function(){
					if(document.getElementById("de") != null &amp;&amp; document.getElementById("directedit")) {
						var link = document.getElementById("de").parentNode.innerHTML;
						document.getElementById("de").parentNode.innerHTML = "";
						document.getElementById("directedit").innerHTML = link.replace(/^\s+|\s+$/gm,'');
				}
				}, 1000);

			});
		</script>
	</xsl:template>

	<xsl:template name="common-footcode">
		<xsl:call-template name="output-include">
			<xsl:with-param name="path">/_resources/includes/footcode-03-25-2026.inc</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="output-include">
			<xsl:with-param name="path">/_resources/includes/analytics.inc</xsl:with-param>
			<xsl:with-param name="condition" select="$is-pub" />
		</xsl:call-template>
		<xsl:call-template name="gallery-footcode" />
		<xsl:call-template name="form-footcode" />
	</xsl:template>

	<xsl:template name="side-navigation">
		<xsl:call-template name="output-navigation">
			<xsl:with-param name="script-loc" select="'/_resources/php/sitenav.php'" />
			<xsl:with-param name="kind" select="'php'" />
		</xsl:call-template>
	</xsl:template>

	<xsl:template name="editor-plugins-css">
		<xsl:if test="$is-edt">
			<link rel="stylesheet" href="//cdn.omniupdate.com/select-lists/v1/select-lists.min.css" />
			<link rel="stylesheet" href="//cdn.omniupdate.com/table-separator/v1/table-separator.css" />
		</xsl:if>
	</xsl:template>

	<xsl:template name="editor-plugins-js">
		<xsl:if test="$is-edt">
			<!-- jQuery 1.5+ is required for Select Lists and Table Separator. Add it here if not already included. -->
			<script src="//cdn.omniupdate.com/select-lists/v1/select-lists.min.js" defer="defer"></script>
			<script src="//cdn.omniupdate.com/table-separator/v1/table-separator.js" defer="defer"></script>
		</xsl:if>
	</xsl:template>

	<!-- in case not defined in page type xsl, leave for debugging purposes -->
	<xsl:template name="page-content"><p>No template defined.</p></xsl:template>
	<xsl:template name="template-headcode"/>
	<xsl:template name="template-footcode"/>
	<xsl:template name="template-bodycode"/>

</xsl:stylesheet>
