-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--

	Page to XHTML Transform

	 Author:
		Name  : Hugh Field-Richards
		Email : hsfr@hsfr.org.uk

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

   Date                   Who    Changes
   ==========================================================================

   15th May 2006          HSFR   Created
   26th February 2007     HSFR   Added session parameters
   26th August 2010       HSFR   Complete rework
   
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- Copyright -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
   
  LICENSE:
  
  Paloose is free software: you can redistribute it and/or modify 
  it under the terms of the GNU General Public License as published by 
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version. 
  
  This program is distributed in the hope that it will be useful, 
  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  GNU General Public License for more details. 
  
  You should have received a copy of the GNU General Public License 
  along with this program.  If not, see <http://www.gnu.org/licenses/> 
 
  Copyright 2006 - 2010 Hugh Field-Richards.
   
-->
-<xsl:stylesheet version="1.0" __file="ba7394b12651132cd7f6025be83040c6" __status="-1" xmlns:email="http://www.hsfr.org.uk/Schema/Email" xmlns:page="http://www.hsfr.org.uk/Schema/Page" xmlns:news="http://www.hsfr.org.uk/Schema/News" xmlns:text="http://www.hsfr.org.uk/Schema/Text" xmlns:link="http://www.hsfr.org.uk/Schema/Link" xmlns:list="http://www.hsfr.org.uk/Schema/List" xmlns:graphic="http://www.hsfr.org.uk/Schema/Graphic" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8"/>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
      Add any parameters from the sitemap here. For example
   
      <map:transform src="context://resources/transforms/page2html.xsl">
         <map:parameter name="page" value="{1}"/>
      </map:transform>
   
-->
<xsl:param name="page"/>
<xsl:param name="baseDir"/>
<xsl:param name="admin" select="0"/>
<xsl:param name="sessionUser"/>
<xsl:param name="sessionFullname"/>
<xsl:param name="locale"/>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
      Add your global variables here as required. The default values are set here as well.
   
-->
<xsl:variable name="gPage" select="$page"/>
<xsl:variable name="gBaseDir" select="$baseDir"/>
<xsl:variable name="gAdmin" select="$admin"/>
<xsl:variable name="gSessionUser" select="$sessionUser"/>
<xsl:variable name="gFullName" select="$sessionFullname"/>
-<!--
 xsl:variable name="gImagesDir" select="'/pp/resources/images/'"/ 
-->
-<xsl:variable name="gPageTitle">
-<xsl:choose>
-<xsl:when test="string-length( //page:meta/page:pageTitle ) > 0">
<xsl:value-of select="//page:meta/page:pageTitle"/>
</xsl:when>
-<xsl:otherwise>
<xsl:value-of select="'Paloose'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
      Comma separated list of style files.
   
-->
<xsl:variable name="gCSSFilesDir" select="'/pp/resources/styles/'"/>
<xsl:variable name="gCSSFiles" select="'paloose.css,topPanel.css,menusPanel.css,text.css,faq.css,jqueryslidemenu.css,breadcrumb.css,ppForms.css'"/>
<xsl:variable name="gScriptFilesDir" select="'/pp/resources/scripts/'"/>
<xsl:variable name="gScriptFiles" select="'jquery.js;jqueryslidemenu.js;breadcrumb.js'"/>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
      The root where it all starts. It should not be necessary to change anything in here.
      The main user change area is all within the buildBody etc.
   
-->
-<xsl:template match="/">
-<xsl:element name="html">
<xsl:attribute name="lang">en</xsl:attribute>
-<!--
 Put html attributes here - for example language 
-->
-<xsl:element name="head">
-<xsl:call-template name="buildHeader.htmlHead">
<xsl:with-param name="inTitle" select="$gPageTitle"/>
<xsl:with-param name="inStylesList" select="$gCSSFiles"/>
<xsl:with-param name="inStylesDir" select="$gCSSFilesDir"/>
<xsl:with-param name="inScriptsList" select="$gScriptFiles"/>
<xsl:with-param name="inScriptsDir" select="$gScriptFilesDir"/>
</xsl:call-template>
</xsl:element>
-<xsl:element name="body">
-<xsl:element name="a">
<xsl:attribute name="name">topOfPage</xsl:attribute>
</xsl:element>
-<xsl:element name="div">
<xsl:attribute name="id">bodyFrame</xsl:attribute>
<xsl:call-template name="buildBody.htmlBody"/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
	   Any external XSL files to be included go here. These go at the end to make sure
	   the above override them.
   
-->
<xsl:include href="buildHeader.xsl"/>
<xsl:include href="buildBody.xsl"/>
<xsl:include href="text2html.xsl"/>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 
-->
-<xsl:template name="common.substring-after-last">
<xsl:param name="string"/>
<xsl:param name="delimiter"/>
-<xsl:choose>
-<xsl:when test="contains($string, $delimiter)">
-<xsl:call-template name="common.substring-after-last">
<xsl:with-param name="string" select="substring-after($string, $delimiter)"/>
<xsl:with-param name="delimiter" select="$delimiter"/>
</xsl:call-template>
</xsl:when>
-<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 
		Soak up any remaining elements not processed by the above
	
-->
-<xsl:template match="node()|@*" priority="-1">
-<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>