<?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;">
]>
<!--
Implementations Skeleton - 01/10/2017

STANDARD TEMPLATE MATCHES
Identity templates that recursively copies all content, or applies other applicable templates.

Contributors: Your Name Here
Last Updated: Enter Date Here
-->
<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="xs ou fn ouc">

	<!-- Identity Matches -->
	<!-- The following mode will match all items except processing instructions, copies them, then processes any children. -->
	<xsl:mode on-no-match="shallow-copy" />
	<!-- match the pcf-sheet to make the editable region function -->
	<xsl:template match="processing-instruction('pcf-stylesheet')" mode="#all" />

	<!-- MISC -->
	<!-- don't output ouc tags on publish. -->
	<xsl:template match="ouc:*[$ou:action !='edt']" mode="#all">
		<xsl:apply-templates mode="#current"/>
	</xsl:template>

	<xsl:template match="ouc:div" mode="edit-button">
		<xsl:copy>
			<xsl:apply-templates select="ouc:editor" />
		</xsl:copy>
	</xsl:template>

	<xsl:template match="ouc:div[$is-edt]" mode="edit-button">
		<xsl:copy>
			<xsl:apply-templates select="attribute()|ouc:editor" />
		</xsl:copy>
	</xsl:template>

	<!-- Visual warning for broken dependencies tags -->
	<xsl:template match="a[contains(@href,'*** Broken')]" mode="#all">
		<a href="{@href}" style="color: red;"><xsl:value-of select="."/></a> <span style="color: red;">[BROKEN LINK]</span>
	</xsl:template>

	  <xsl:template match="ouc:div[$is-edt]" mode="edt-button">
	    <xsl:copy>
	      <xsl:apply-templates select="attribute()|ouc:editor" />
	    </xsl:copy>
	  </xsl:template>

	<!-- The following template matches processing instructions, outputs the proper syntax with the code escaped properly. -->
	<!-- Remove closing '?' mark if not HTML5 output. -->
	<xsl:template match="processing-instruction('php')" mode="#all">
		<xsl:processing-instruction name="php">
			<xsl:value-of select="." disable-output-escaping="yes" />
		?</xsl:processing-instruction>
	</xsl:template>

<!-- 	<xsl:template match="news-events" expand-text="yes">
		<xsl:variable name="rss-feed" select="@rss-feed" />
		<xsl:variable name="count" select="@count" />
		<xsl:variable name="tags" select="@tags" />
		<xsl:variable name="heading" select="@heading" />
		<xsl:variable name="mode" select="if (not(@mode)) then'newslist' else @mode" />

		<pre><xsl:copy-of select="." /></pre>
		<xsl:comment> rss-feed {@rss-feed} </xsl:comment>
		<xsl:comment> count {@count} </xsl:comment>
		<xsl:comment> tags {@tags} </xsl:comment>
		<xsl:comment> heading {@heading} </xsl:comment>
		<xsl:comment> mode {@mode} </xsl:comment>

		<xsl:if test="@heading != ''">
			<h3>{@heading}</h3>
		</xsl:if>

		<xsl:call-template name="news-events">
			<xsl:with-param name="rss-feed" select="@rss-feed" />
			<xsl:with-param name="count" select="@count" />
			<xsl:with-param name="tags" select="@tags" />
			<xsl:with-param name="mode" select="@mode" />
		</xsl:call-template>

	</xsl:template> -->

	</xsl:stylesheet>