-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
   
   Common Templates for Page Building Body
   
   Author:
      Name  : Hugh Field-Richards
      Email : hsfr@hsfr.org.uk
   
   LICENSE:
 
   This software is free software; you can redistribute it
   and/or modify it under the terms of the GNU Lesser General
   Public License as published by the Free Software Foundation;
   either version 2.1 of the License, or (at your option) any
   later version.
   
   This software 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
   Lesser General Public License for more details.
   
   You should have received a copy of the GNU Lesser General Public
   License along with this software; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
   
-->
-<xsl:stylesheet version="1.0" __file="9e3793f352a7b2fbe456d82c8a0c399a" __status="-1" xmlns:paloose="http://www.paloose.org/schemas/Paloose/1.0" 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">
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
	   Any external XSL files to be included go here.
   
-->
<xsl:include href="buildTopPanel.xsl"/>
<xsl:include href="buildMenusPanel.xsl"/>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 
      The body has a single frame in which all the various panels site.
   
-->
-<xsl:template name="buildBody.htmlBody">
-<xsl:element name="div">
<xsl:attribute name="id">topPanel</xsl:attribute>
<xsl:call-template name="buildTopPanel.topPanel"/>
</xsl:element>
-<!--
 Breadcrumb stuff 
-->
-<xsl:if test="//breadcrumbs//list:item[ @id=$gPage ]">
-<xsl:element name="div">
<xsl:attribute name="id">breadcrumbPanel</xsl:attribute>
<xsl:call-template name="buildBody.buildBreadcrumbs"/>
</xsl:element>
</xsl:if>
-<xsl:element name="div">
<xsl:attribute name="id">contentPanel</xsl:attribute>
-<xsl:choose>
-<xsl:when test="$gPage = 'index'">
<xsl:call-template name="buildBody.buildIndex"/>
</xsl:when>
-<xsl:when test="$gPage = 'faq'">
<xsl:call-template name="buildBody.buildFAQ"/>
</xsl:when>
-<xsl:when test="$gPage = 'news'">
<xsl:call-template name="buildBody.buildNews"/>
</xsl:when>
-<xsl:otherwise>
<xsl:apply-templates mode="inline-text" select="//content/page:content/*"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
-<xsl:element name="div">
<xsl:attribute name="id">copyrightPanel</xsl:attribute>
<xsl:value-of select="//page:copyright"/>
<xsl:apply-templates mode="inline-text" select="//page:copyright/*"/>
</xsl:element>
</xsl:template>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 
      Index Page is slightly different to the others. There are two columns: the left
      for standard content (id = 'body'), and the right for news etc. Because of the 
      way that divs do not work vertically in sensible columns (the containing div
      never sets its height properly without tortuous CSS workings) I use a simple
      two cell table here. And devil take the purists.
   
-->
-<xsl:template name="buildBody.buildIndex">
-<xsl:element name="table">
<xsl:attribute name="id">indexPageTable</xsl:attribute>
-<xsl:element name="tr">
-<xsl:element name="td">
<xsl:attribute name="id">leftPanel</xsl:attribute>
<xsl:apply-templates mode="inline-text" select="//content/page:content/text:group[ @id='body']/*"/>
</xsl:element>
-<xsl:element name="td">
<xsl:attribute name="id">rightPanel</xsl:attribute>
-<xsl:element name="div">
<xsl:attribute name="id">downloadPanel</xsl:attribute>
-<xsl:element name="div">
<xsl:attribute name="class">downloadPanelText</xsl:attribute>
-<xsl:element name="a">
<xsl:attribute name="href">downloads/paloose-latest.tgz</xsl:attribute>
-<xsl:element name="h2">
<xsl:text>Download Latest Version</xsl:text>
</xsl:element>
-<xsl:element name="p">
<xsl:value-of select="document( '../../content/downloads.xml' )//paloose:versions/paloose:version/paloose:version-number"/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
-<xsl:element name="div">
<xsl:attribute name="id">latestNewsPanel</xsl:attribute>
-<xsl:element name="div">
<xsl:attribute name="class">latestNewsPanelText</xsl:attribute>
-<xsl:element name="a">
<xsl:attribute name="href">news.html</xsl:attribute>
-<xsl:element name="h2">
<xsl:text>Latest News</xsl:text>
</xsl:element>
-<xsl:element name="p">
<xsl:value-of select="//news:channel/news:description"/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
-<xsl:element name="div">
<xsl:attribute name="id">rightPanelText</xsl:attribute>
-<xsl:element name="h2">
<xsl:text>Paloose supports...</xsl:text>
</xsl:element>
<xsl:apply-templates mode="inline-text" select="//content/page:content/text:group[ @id='rightPanel']/*"/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
      The FAQ requires an index at the top
   
-->
-<xsl:template name="buildBody.buildFAQ">
<xsl:apply-templates mode="inline-text" select="//page:content/text:heading[ @level='1' ]"/>
-<xsl:element name="div">
<xsl:attribute name="class">faqContents</xsl:attribute>
-<xsl:for-each select="//page:content/text:group[ @label= 'faqEntry' ]/text:heading[ @level='2' ]">
-<xsl:element name="div">
<xsl:attribute name="class">faqContentsItem</xsl:attribute>
-<xsl:element name="a">
-<xsl:attribute name="href">
<xsl:value-of select="concat( '#', @id )"/>
</xsl:attribute>
<xsl:apply-templates mode="inline-text"/>
</xsl:element>
</xsl:element>
</xsl:for-each>
</xsl:element>
-<xsl:for-each select="//page:content//text:group[ @label= 'faqEntry' ]">
<xsl:apply-templates mode="inline-text"/>
-<xsl:element name="div">
<xsl:attribute name="class">returnToTop</xsl:attribute>
-<xsl:element name="a">
-<xsl:attribute name="href">
<xsl:value-of select="'#topOfPage'"/>
</xsl:attribute>
<xsl:value-of select="//list:list[ @id='headings' ]/list:item[ @id = 'returnTop' ]"/>
</xsl:element>
</xsl:element>
</xsl:for-each>
-<!--
 xsl:call-template name="conformanceIcons"/ 
-->
</xsl:template>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
      The News requires an index at the top
   
-->
-<xsl:template name="buildBody.buildNews">
-<!--
 Take everything from the news content file first 
-->
<xsl:apply-templates mode="inline-text" select="//content/page:content/*"/>
-<xsl:for-each select="//news-articles/news:channel">
<xsl:sort select="@id" order="descending" data-type="number"/>
-<xsl:element name="div">
<xsl:attribute name="class">mainNEWSdate</xsl:attribute>
-<xsl:element name="a">
-<xsl:attribute name="name">
<xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:value-of select="news:date"/>
</xsl:element>
<xsl:text></xsl:text>
<xsl:value-of select="news:title"/>
</xsl:element>
-<xsl:element name="div">
<xsl:attribute name="class">newsArticleBody</xsl:attribute>
<xsl:apply-templates mode="inline-text" select="news:text"/>
</xsl:element>
</xsl:for-each>
</xsl:template>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
      The breadcrumb panel
   
-->
-<xsl:template name="buildBody.buildBreadcrumbs">
-<xsl:element name="ul">
<xsl:attribute name="id">crumbs</xsl:attribute>
-<xsl:for-each select="//breadcrumbs//list:item[ @id = $gPage ]/ancestor-or-self::*">
-<xsl:if test="@id">
-<xsl:element name="li">
-<xsl:element name="a">
-<xsl:attribute name="href">
<xsl:value-of select="link:link/@ref"/>
</xsl:attribute>
<xsl:value-of select="link:link"/>
-<xsl:if test="not( position() = last() )">
<xsl:text> > </xsl:text>
</xsl:if>
</xsl:element>
</xsl:element>
</xsl:if>
</xsl:for-each>
</xsl:element>
</xsl:template>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<!--
 
      Override the normal group stuff.
    
-->
-<xsl:template match="text:group[ @id='peopleComments' ]" mode="inline-text">
<xsl:apply-templates mode="peopleComments"/>
</xsl:template>
-<!--
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
-->
-<xsl:template match="text:quote" mode="peopleComments">
-<xsl:element name="div">
<xsl:attribute name="class">peopleComment</xsl:attribute>
<xsl:apply-templates mode="inline-text"/>
</xsl:element>
-<xsl:element name="div">
<xsl:attribute name="class">peopleCommentFooter</xsl:attribute>
-<xsl:choose>
-<xsl:when test="@ref">
-<xsl:element name="a">
-<xsl:attribute name="href">
<xsl:value-of select="@ref"/>
</xsl:attribute>
-<xsl:attribute name="target">
<xsl:value-of select="'quote'"/>
</xsl:attribute>
<xsl:value-of select="@who"/>
</xsl:element>
</xsl:when>
-<xsl:otherwise>
<xsl:value-of select="@who"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:template>
</xsl:stylesheet>