Project

Profile

Help

Bug #1738 » iso2html.xsl

Modified xsl to prevent exceeding method length limits in bytecode generation - O'Neil Delpratt, 2013-04-23 16:47

 
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012 Her Majesty the Queen in Right of Canada

Project: ESS GeoSpatial Platform (a.k.a. GeoGratis API)

Author(s): GeoGratis API development team.

Description: This stylesheet transforms an ATOM feed or entry into a Government
of Canada Standard on Web Accessibility and Standard on Web Usability
compliant web page.

Expected Input: A GeoGratis API ATOM document.

Return/Output: HTML page
-->

<xsl:stylesheet version="2.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:georss="http://www.georss.org/georss"
xmlns:gml="http://www.opengis.net/gml"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:as="http://atomserver.org/namespaces/atomserver/1.0"
xmlns:os="http://a9.com/-/spec/opensearch/1.1"
exclude-result-prefixes="xs atom xsl georss gml gmd xsi gco xlink as os">

<!-- Language of ATOM feed passed into stylsheet -->
<xsl:param name="lang"/>
<!-- q parameter -->
<xsl:param name="q"/>
<xsl:output method="html" encoding="UTF-8" indent="no" />
<xsl:strip-space elements="*"/>

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

ATOM Entry

***********************************************************************************************************************************************
-->

<xsl:template name="atom-entry" match="atom:entry">
<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html>&#10;</xsl:text>
<xsl:variable name="base-uri" select="/node()/@xml:base"/>
<xsl:variable name="lang-ISO639-1">
<xsl:choose>
<xsl:when test="$lang='fr'">fr</xsl:when>
<xsl:otherwise>en</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="lang-ISO639-2">
<xsl:choose>
<xsl:when test="$lang='fr'">fre</xsl:when>
<xsl:otherwise>eng</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="locale">
<xsl:choose>
<xsl:when test="$lang='fr'">fr_CA</xsl:when>
<xsl:otherwise>en_CA</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="domain">
<!--<xsl:variable name="t" select="tokenize(substring-after(concat($base-uri, atom:link[@rel='self']/@href), 'http://'), '/|:')"/>-->
<xsl:variable name="t" select="('test1','test2','','test3')"/>
<xsl:choose>
<xsl:when test="$t[1]='localhost'">dev</xsl:when>
<xsl:when test="$t[1]='dev.geogratis.gc.ca'">dev</xsl:when>
<xsl:when test="$t[3]='beta'">beta</xsl:when>
<xsl:otherwise>prod</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="colon">
<xsl:choose>
<xsl:when test="$lang-ISO639-1='fr'"> :</xsl:when>
<xsl:otherwise>:</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="$lang-ISO639-1='en'">
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if IE 7]><html lang="en" class="no-js ie7"><![endif]-->]]></xsl:text>
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if IE 8]><html lang="en" class="no-js ie8"><![endif]-->]]></xsl:text>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if IE 7]><html lang="fr" class="no-js ie7"><![endif]-->]]></xsl:text>
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if IE 8]><html lang="fr" class="no-js ie8"><![endif]-->]]></xsl:text>
</xsl:if>
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if gt IE 8]><!-->]]>
</xsl:text>
<html lang="{$lang-ISO639-1}" class="no-js">
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--<![endif]-->]]></xsl:text>
<head>
<meta charset="utf-8"/>
<title>
<xsl:call-template name="escape">
<xsl:with-param name="text" select="normalize-space(atom:title)"/>
</xsl:call-template>
</title>
<link rel="shortcut icon" href="/build-3.0.2/theme-gcwu-fegc/images/favicon.ico"/>
<link rel="canonical" href="{concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)}"/>
<!--<link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
<link rel="schema.dcterms" href="http://purl.org/dc/terms/" />-->
<xsl:if test="atom:link[@rel='search']">
<link rel="search" type="application/opensearchdescription+xml" href="{concat($base-uri, atom:link[@rel='search']/@href)}" title="{atom:link[@rel='search']/@title}" />
</xsl:if>
<!-- Meta-data begins / Début des métadonnées -->
<meta name="description">
<xsl:attribute name="content">
<xsl:variable name="newTxt">
<xsl:if test="$lang-ISO639-1='en'">No product description provided by publisher.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Aucune description du produit n'est fournie par l'éditeur.</xsl:if>
</xsl:variable>
<xsl:variable name="oldTxt">
<xsl:if test="$lang-ISO639-1='en'">Abstract not available</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Résumé non disponible</xsl:if>
</xsl:variable>
<xsl:call-template name="escape">
<xsl:with-param name="text" select="normalize-space(replace(atom:summary, $oldTxt, $newTxt ))"/>
</xsl:call-template>
</xsl:attribute>
</meta>
<meta name="dcterms.creator">
<xsl:attribute name="content">
<xsl:value-of select="normalize-space(atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString)"/>
</xsl:attribute>
</meta>
<meta name="dcterms.title">
<xsl:attribute name="content">
<xsl:call-template name="escape">
<xsl:with-param name="text" select="normalize-space(atom:title)"/>
</xsl:call-template>
</xsl:attribute>
</meta>
<meta name="dcterms.issued" title="W3CDTF" content="{atom:published}"/>
<meta name="dcterms.modified" content="{atom:updated}"/>
<meta name="dcterms.subject" title="scheme">
<xsl:attribute name="content">
<xsl:for-each select="atom:category[@scheme='urn:gc:subject']">
<xsl:if test="position() !=1">, </xsl:if>
<xsl:choose><xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when><xsl:otherwise><xsl:value-of select="@term"/></xsl:otherwise></xsl:choose>
</xsl:for-each>
</xsl:attribute>
</meta>
<meta name="dcterms.language" title="ISO639-2">
<xsl:attribute name="content">
<xsl:value-of select="$lang-ISO639-2"/>
</xsl:attribute>
</meta>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="/build-3.0.2/js/jquery.min.js"></script>
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if lte IE 8]>
<script src="/build-3.0.2/js/polyfills/html5shiv-min.js"></script>
<link rel="stylesheet" href="/build-3.0.2/grids/css/util-ie-min.css" />
<link rel="stylesheet" href="/build-3.0.2/js/css/pe-ap-ie-min.css" />
<link rel="stylesheet" href="/build-3.0.2/theme-gcwu-fegc/css/theme-ie-min.css" />
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="/build-3.0.2/grids/css/util-min.css" />
<link rel="stylesheet" href="/build-3.0.2/js/css/pe-ap-min.css" />
<link rel="stylesheet" href="/build-3.0.2/theme-gcwu-fegc/css/theme-min.css" />
<!--<![endif]-->]]>
</xsl:text>
<noscript>
<link href="/build-3.0.2/theme-gcwu-fegc/css/theme-ns-min.css" rel="stylesheet"/>
</noscript>
<!-- CustomScriptsCSSStart -->
<link href="/geogratis-api-1.3.0/css/geogratis.min.css" rel="stylesheet"/>
<!-- CustomScriptsCSSEnd -->
</head>
<body itemscope="itemscope" itemtype="http://schema.org/ItemPage">
<div id="wb-body">
<xsl:call-template name="header">
<xsl:with-param name="lang-ISO639-1" select="$lang-ISO639-1"/>
<xsl:with-param name="domain" select="$domain"/>
</xsl:call-template>
<div id="wb-core"><div id="wb-core-in" class="equalize">
<div id="wb-main" role="main"><div id="wb-main-in">
<!-- MainContentStart -->
<div class="span-6">
<xsl:call-template name="make-header">
<xsl:with-param name="domain" select="$domain" />
<xsl:with-param name="colon" select="$colon" />
<xsl:with-param name="lang" select="$lang" />
<xsl:with-param name="lang-ISO639-1" select="$lang-ISO639-1" />
</xsl:call-template>
<section id="metadata" class="wet-boew-texthighlight">
<!-- render tags if they exist and the they do not contain ">" characters (i.e. GCMD). -->
<xsl:call-template name="make-body1">
<xsl:with-param name="domain" select="$domain" />
<xsl:with-param name="colon" select="$colon" />
<xsl:with-param name="lang" select="$lang" />
<xsl:with-param name="lang-ISO639-1" select="$lang-ISO639-1" />
<xsl:with-param name="base-uri" />
</xsl:call-template>
<xsl:if test="atom:category[@scheme='urn:iso:type']">
<div>
<span class="label float-left">
<xsl:if test="$lang-ISO639-1='en'">Product type</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Type de produit</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<ul class="menu-horizontal comma-seperated">
<xsl:for-each select="atom:category[@scheme='urn:iso:type']">
<xsl:variable name="type">
<!-- xsl:if test="@label='mapDigital; carteNumérique' or @label='mapDigital' or @label='carteNumérique'"><xsl:if test="$lang-ISO639-1='en'">Map Data</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Données cartographiques</xsl:if></xsl:if>
<xsl:if test="@label='imageDigital; imageNumérique' or @label='imageDigital' or @label='imageNumérique'">Image/Photo</xsl:if>
<xsl:if test="@label='modelDigital; modèleNumérique' or @label='modelDigital' or @label='modèleNumérique'"><xsl:if test="$lang-ISO639-1='en'">Elevation Data</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Données d'élévation</xsl:if></xsl:if>
<xsl:if test="@label='documentDigital; documentNumérique' or @label='documentDigital' or @label='documentNumérique'">Document</xsl:if>
<xsl:if test="@label='tableDigital; tableNumérique' or @label='tableDigital' or @label='tableNumérique'">Table</xsl:if>
<xsl:if test="@label='mapHardcopy; cartePapier' or @label='mapHardcopy' or @label='cartePapier'"><xsl:if test="$lang-ISO639-1='en'">Map Hardcopy</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Carte Papier</xsl:if></xsl:if>
<xsl:if test="@label='profileDigital; profilNumérique' or @label='profilNumérique' or @label='profileDigital'">Profile</xsl:if -->
<xsl:value-of select="@label"/>
</xsl:variable>
<li>
<a rel="nofollow">
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="@term='documentDigital; documentNumérique' or @term='tableDigital; tableNumérique'">
<xsl:value-of select="concat($base-uri, substring-before(/node()/atom:link[@rel='self']/@href, //*[local-name()='entryId']))"/>-/OR/(<xsl:value-of select="@scheme"/>)<xsl:value-of select="encode-for-uri('documentDigital; documentNumérique')"/>/(<xsl:value-of select="@scheme"/>)<xsl:value-of select="encode-for-uri('tableDigital; tableNumérique')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($base-uri, substring-before(/node()/atom:link[@rel='self']/@href, //*[local-name()='entryId']))"/>-/(<xsl:value-of select="@scheme"/>)<xsl:value-of select="encode-for-uri(@term)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="$type"/>
</a>
</li>
</xsl:for-each>
</ul>
</div>
</xsl:if>
<!-- itemType Place -->
<div itemscope="itemscope" itemprop="contentLocation" itemtype="http://schema.org/Place">
<h3>
<xsl:if test="$lang-ISO639-1='en'">Geographic Location</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">L'emplacement géographique</xsl:if>
</h3>
<div itemprop="geo" itemscope="itemscope" itemtype="http://schema.org/GeoShape">
<meta itemprop="box" content="{normalize-space(//georss:where//(gml:posList|gml:pos))}"/>
</div>
<xsl:variable name="coords" select="tokenize(string-join(normalize-space(//georss:where//(gml:posList|gml:pos)),'\s+'),'\s+')"/>
<xsl:variable name="xmin" select="round-half-to-even(min(for $n in ($coords[(position() mod 2) eq 0]) return xs:double($n)),7)"/>
<xsl:variable name="xmax" select="round-half-to-even(max(for $n in ($coords[(position() mod 2) eq 0]) return xs:double($n)),7)"/>
<xsl:variable name="ymin" select="round-half-to-even(min(for $n in ($coords[(position() mod 2) ne 0]) return xs:double($n)),7)"/>
<xsl:variable name="ymax" select="round-half-to-even(max(for $n in ($coords[(position() mod 2) ne 0]) return xs:double($n)),7)"/>
<div id="extent-map" class="float-left">
<p>
<img src="http://wms.ess-ws.nrcan.gc.ca/wms/mapserv?map=/export/wms/mapfiles/reference/overview.map&amp;mode=reference&amp;mapext={$xmin}%20{$ymin}%20{$xmax}%20{$ymax}" aria-describedby="geographic-bbox">
<xsl:attribute name="alt">
<xsl:if test="$lang-ISO639-1='en'">Geographic bounding box extent of the product.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Étendue géographique de la boite de délimitation du produit</xsl:if>
</xsl:attribute>
</img>
</p>
</div>
<div id="geographic-bbox" class="span-2">
<p class="wb-invisible">
<xsl:if test="$lang-ISO639-1='en'">Geographic bounding box extent: detailed latitude and longitude coordinates follow.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Étendue géographique de la boite de limitation: les coordonnées latitudinal et longitudinal détaillé suivent.</xsl:if>
</p>
<p class="coord-north">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">North</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Nord</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:value-of select="format-number(number($ymax), '0.0######')"/>
</p>
<p class="coord-east">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">East</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Est</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:value-of select="format-number(number($xmax), '0.0######')"/>
</p>
<p class="coord-south">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">South</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Sud</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:value-of select="format-number(number($ymin), '0.0######')"/>
</p>
<p class="coord-west">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">West</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Ouest</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:value-of select="format-number(number($xmin), '0.0######')"/>
</p>
</div>
<div class="clear"></div>
<xsl:if test="atom:category[@scheme='urn:iso:place']">
<div>
<p class="wb-invisible">
<xsl:if test="$lang-ISO639-1='en'">The geographic location is associated with the following regions.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">L’emplacement géographique est associé avec les régions suivantes.</xsl:if>
</p>
<span class="label float-left" aria-hidden="true">
<xsl:if test="$lang-ISO639-1='en'">Region</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Région</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<ul class="menu-horizontal comma-seperated">
<xsl:for-each select="atom:category[@scheme='urn:iso:place']">
<li>
<a rel="nofollow">
<xsl:attribute name="href">
<xsl:value-of select="concat($base-uri, substring-before(/node()/atom:link[@rel='self']/@href, //*[local-name()='entryId']))"/>-/(<xsl:value-of select="@scheme"/>)<xsl:value-of select="encode-for-uri(@term)"/>
</xsl:attribute>
<span itemprop="name">
<span class="wb-invisible">
<xsl:if test="$lang-ISO639-1='en'">Geographic region</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Région géographique</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:choose><xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when><xsl:otherwise><xsl:value-of select="@term"/></xsl:otherwise></xsl:choose></span>
</a>
</li>
</xsl:for-each>
</ul>
</div>
</xsl:if>
</div>
<div class="clear"></div>
<!-- end itemType Place -->
<!-- itemType Organization -->
<xsl:if test="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']">
<section id="contact-details" itemscope="itemscope" itemprop="publisher" itemtype="http://schema.org/Organization">
<h3>
<xsl:if test="$lang-ISO639-1='en'">Contact Information</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Informations de Contact</xsl:if>
</h3>
<p id="publisher-name" itemprop="name">
<strong>
<xsl:value-of select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']/gmd:organisationName/gco:CharacterString"/>
</strong>
</p>
<!--<link itemprop="url" href="http://nrcan.gc.ca"/>-->
<!-- itemType PostalAddress -->
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Postal address</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Adresse postale</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<p id="address" itemscope="itemscope" itemprop="address" itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">
<xsl:variable name="physicalAddress" select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:deliveryPoint/gco:CharacterString"/>
<xsl:for-each select="tokenize($physicalAddress, ';')">
<xsl:if test="position()!=1">
<xsl:value-of select="normalize-space(.)"/>
<xsl:if test="position()!=last() and not(normalize-space(.)='')"><xsl:text>, </xsl:text></xsl:if>
</xsl:if>
</xsl:for-each>
</span>
<br/>
<span itemprop="addressLocality">
<xsl:value-of select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:city/gco:CharacterString"/>, <xsl:value-of select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:administrativeArea/gco:CharacterString"/>
</span>
<br/>
<span itemprop="addressCountry">
<xsl:value-of select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:country/gco:CharacterString"/>
</span>
<br/>
<span itemprop="postalCode">
<xsl:value-of select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:postalCode/gco:CharacterString"/>
</span>
</p>
<!-- end itemtype PostalAddress -->
<div id="contact-details-telephone">
<xsl:for-each select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']/gmd:contactInfo/gmd:CI_Contact/gmd:phone/gmd:CI_Telephone/gmd:voice/gco:CharacterString">
<p>
<xsl:if test="$lang-ISO639-1='en'">Telephone</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Téléphone</xsl:if>
<xsl:value-of select="$colon"/>
<span itemprop="telephone">
<xsl:if test="$lang-ISO639-1='en'">
<xsl:value-of select="replace(normalize-space(.), 'voice;', '')"/>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<xsl:value-of select="replace(normalize-space(.), 'voix;', '')"/>
</xsl:if>
</span>
</p>
</xsl:for-each>
</div>
<p id="contact-details-email">
<xsl:if test="$lang-ISO639-1='en'">E-mail</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Courriel</xsl:if>
<xsl:value-of select="$colon"/><xsl:text> </xsl:text>
<a itemprop="email">
<xsl:attribute name="href">mailto:<xsl:value-of select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString"/></xsl:attribute>
<xsl:value-of select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[./gmd:role/gmd:CI_RoleCode='pointOfContact' or ./gmd:role/gmd:CI_RoleCode='pointOfContact; contact']/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString"/>
</a>
</p>
</section>
</xsl:if>
<!-- end itemtype Organization -->
<section id="license">
<h3>
<xsl:if test="$lang-ISO639-1='en'">License</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Licence</xsl:if>
</h3>
<xsl:for-each select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints">
<xsl:variable name="lic">
<xsl:choose>
<xsl:when test="gmd:MD_Constraints">
<xsl:value-of select="gmd:MD_Constraints/gmd:useLimitation/gco:CharacterString"/>
</xsl:when>
<xsl:when test="gmd:MD_LegalConstraints/gmd:useConstraints/gmd:MD_RestrictionCode[ends-with(@codeListValue,'RI_606')]">
<xsl:value-of select="gmd:MD_LegalConstraints/gmd:otherConstraints/gco:CharacterString"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="gmd:MD_LegalConstraints/gmd:useLimitation/gco:CharacterString"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<p class="license">
<xsl:call-template name="hyperlink">
<xsl:with-param name="string" select="$lic"/>
</xsl:call-template>
</p>
</xsl:for-each>
</section>
<section id="distribution">
<h2>
<xsl:if test="$lang-ISO639-1='en'">Resources</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Les ressources</xsl:if>
</h2>
<p>
<xsl:if test="$lang-ISO639-1='en'">The following files are available for download.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Les fichiers suivants sont disponibles pour téléchargement.</xsl:if>
</p>
<xsl:for-each select="atom:content/gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions">
<xsl:for-each select="gmd:onLine">
<!-- Is there a better way to skip HTTP download links? -->
<xsl:if test="not(gmd:CI_OnlineResource/gmd:protocol[lower-case(gco:CharacterString)='http'])">
<xsl:variable name="filename" select="substring-before(tokenize(gmd:CI_OnlineResource/gmd:linkage/gmd:URL, '/')[last()], '.')" />
<xsl:variable name="browse-image" select="//atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic[substring-before(tokenize(./gmd:fileName/gco:CharacterString, '/')[last()], '.') eq $filename]"/>
<xsl:variable name="file-desc" select="normalize-space(gmd:CI_OnlineResource/gmd:description/gco:CharacterString)"/>
<div class="span-6 margin-bottom-none border-top">
<div class="file-description row-start span-3 margin-top-medium margin-bottom-small">
<xsl:if test="$browse-image[1]/gmd:fileName/gco:CharacterString">
<xsl:variable name="thumbnail-ext">_tn.jpg</xsl:variable>
<span class="file-image span-1">
<img class="thumbnail" alt="{normalize-space(//atom:title)}" title="{normalize-space(//atom:title)}" src="{replace($browse-image[1]/gmd:fileName/gco:CharacterString, tokenize($browse-image[1]/gmd:fileName/gco:CharacterString, '/')[last()], concat($filename, $thumbnail-ext))}"/>
</span>
</xsl:if>
<xsl:value-of select="$file-desc"/>
</div>
<div class="file-size span-1 margin-top-medium margin-bottom-small">
<span class="float-right">
<xsl:call-template name="file-size">
<xsl:with-param name="fsize" select="number(../gmd:transferSize/gco:Real)"/>
</xsl:call-template>
</span>
</div>
<div class="file-links span-2 margin-top-medium margin-bottom-small row-end">
<a class="span-1 button button-dark float-right" role="link" aria-label="{$file-desc}" itemprop="url" title="{normalize-space(//atom:title)}" href="{gmd:CI_OnlineResource/gmd:linkage/gmd:URL}" onClick="javascript:piwikTracker.trackLink('{gmd:CI_OnlineResource/gmd:linkage/gmd:URL}','download')">
<xsl:choose>
<xsl:when test="not(normalize-space(gmd:CI_OnlineResource/gmd:name/gco:CharacterString)='')">
<xsl:value-of select="normalize-space(gmd:CI_OnlineResource/gmd:name/gco:CharacterString)"/>
</xsl:when>
<xsl:otherwise>
<xsl:if test="$lang-ISO639-1='en'">Download</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Téléchargez</xsl:if>
</xsl:otherwise>
</xsl:choose>
</a>
</div>
</div>
</xsl:if>
</xsl:for-each>
<!--<xsl:if test="gmd:onLine/gmd:CI_OnlineResource/gmd:protocol[lower-case(gco:CharacterString)='ftp']">YES</xsl:if>-->
</xsl:for-each>
</section>
<div class="clear"></div>
<!-- <section id="related-products"><div id="related"></div></section>-->
</section>
</div>
<!-- Supplemental content (right column) begins / Début du contenu supplémentaire (colonne droite) -->
<div class="span-2">
<aside id="complementary" role="complementary">
<section>
<div id="share" class="span-2 margin-bottom-small">
<xsl:call-template name="share">
<xsl:with-param name="lang-ISO639-1" select="$lang-ISO639-1"/>
<xsl:with-param name="url">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri" select="concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</div>
</section>
<section>
<div id="alternate-formats" class="span-2 margin-top-small">
<h2 class="background-accent">
<xsl:if test="$lang-ISO639-1='en'">Alternate Formats</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Formats alternatifs</xsl:if>
</h2>
<div class="module">
<p>
<xsl:if test="$lang-ISO639-1='en'">Get this metadata in another format. Current format is HTML.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Obtenez cette entrée de métadonnées dans un autre format. Le format actuellement affiché est le format HTML.</xsl:if>
</p>
<xsl:call-template name="alternate-representations"/>
</div>
</div>
</section>
<section>
<div id="developer" class="span-2">
<h2 class="background-accent">
<xsl:if test="$lang-ISO639-1='en'">Developers</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Développeurs</xsl:if>
</h2>
<div class="module">
<xsl:if test="$lang-ISO639-1='en'">
<p>Access our metadata and products using our REST API.</p>
<p class="align-center"><a href="http://geogratis.gc.ca/api/en/" title="GeoGratis API">GeoGratis API</a></p>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<p>Accéder nos métadonnées et produits en utilisant notre API REST.</p>
<p class="align-center"><a href="http://geogratis.gc.ca/api/fr/" title="API GeoGratis">API GeoGratis</a></p>
</xsl:if>
</div>
</div>
</section>
<section>
<div id="qr" class="span-2">
<div id="qrcode" class="align-center"></div>
</div>
</section>
</aside>
</div>
<div class="clear"/>
<!-- Supplemental content (right column) ends / Fin du contenu supplémentaire (colonne droite) -->
<!-- Date Modified begins / Début de la date de modification -->
<dl id="gcwu-date-mod" role="contentinfo">
<dt>
<xsl:if test="$lang-ISO639-1='en'">Date modified</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Date de modification</xsl:if>
<xsl:value-of select="$colon"/>
</dt>
<dd>
<!--<span itemprop="dateModified" content="{substring-before(atom:updated, 'T')}">-->
<span itemprop="dateModified">
<time><xsl:value-of select="substring-before(atom:updated, 'T')"/></time>
</span>
</dd>
</dl>
<div class="clear"/>
<!-- Date Modified ends / Fin de la date de modification -->
<!-- GC Web Usability theme ends / Fin du thème de la facilité d'emploi GC -->
</div>
</div>
<!-- Main content ends / Fin du contenu principal -->
</div>
</div>
<!-- Columns end / Fin des colonnes -->
<xsl:call-template name="footer">
<xsl:with-param name="lang-ISO639-1">
<xsl:value-of select="$lang-ISO639-1"/>
</xsl:with-param>
</xsl:call-template>
</div>
<!-- ScriptsStart -->
<script src="/build-3.0.2/theme-gcwu-fegc/js/theme-min.js"></script>
<script src="/build-3.0.2/js/settings.js"></script>
<script src="/build-3.0.2/js/pe-ap-min.js"></script>
<script src="/geogratis-api-1.3.0/js/jquery.qrcode.min.js"></script>
<script src="/geogratis-api-1.3.0/js/geogratis.min.js"></script>
<!-- ScriptsEnd -->
<xsl:call-template name="piwik">
<xsl:with-param name="domain" select="$domain"/>
</xsl:call-template>
<script><xsl:text>
/* &lt;![CDATA[ */
$(document).ready(function(){var recentItemsContext={'entryTitle':'</xsl:text><xsl:call-template name="escape"><xsl:with-param name="text" select="normalize-space(atom:title)"/></xsl:call-template><xsl:text>','entryLink':'</xsl:text><xsl:value-of select="concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)"/><xsl:text>'};initRecentItems(recentItemsContext);var qrcodeContext={'uri':'</xsl:text><xsl:value-of select="concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)"/><xsl:text>&amp;pk_campaign=qrcode'};initQRCode(qrcodeContext);if(typeof(Storage)!=="undefined" &amp;&amp; sessionStorage.highlighter){highlight("wet-boew-texthighlight",JSON.parse(sessionStorage.highlighter));};});
<!-- $(document).ready(function () {
var recentItemsContext = {
'entryTitle':'</xsl:text><xsl:call-template name="escape"><xsl:with-param name="text" select="normalize-space(atom:title)"/></xsl:call-template><xsl:text>',
'entryLink':'</xsl:text><xsl:value-of select="concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)"/><xsl:text>'
};
initRecentItems(recentItemsContext);
var qrcodeContext = {
'uri':'</xsl:text><xsl:value-of select="concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)"/><xsl:text>&amp;pk_campaign=qrcode'
};
initQRCode(qrcodeContext);
if(typeof(Storage)!=="undefined" &amp;&amp; sessionStorage.highlighter) {
highlight("wet-boew-texthighlight", JSON.parse(sessionStorage.highlighter));
};
}); -->
/* ]]&gt; */</xsl:text>
</script>
</body>
</html>
</xsl:template>
<xsl:template name="make-body1">
<xsl:param name="domain" />
<xsl:param name="lang-ISO639-1" />
<xsl:param name="lang" />
<xsl:param name="colon" />
<xsl:param name="base-uri" />
<xsl:if test="atom:category[@scheme='urn:iso:theme'] or atom:category[@scheme='urn:gc:subject']">
<div id="keywords" class="margin-top-large">
<span class="label float-left">
<xsl:if test="$lang-ISO639-1='en'">Tags</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Tags</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<ul class="menu-horizontal indent-none">
<xsl:for-each select="atom:category[@scheme='urn:iso:theme' or @scheme='urn:gc:subject']">
<li class="margin-bottom-medium">
<xsl:if test="not(contains(@term, '>')) and not(contains(@label, '>'))">
<!--<xsl:if test="position() !=1">, </xsl:if> -->
<a rel="nofollow">
<xsl:attribute name="href">
<xsl:value-of select="concat($base-uri, substring-before(/node()/atom:link[@rel='self']/@href, //*[local-name()='entryId']))"/>-/(<xsl:value-of select="@scheme"/>)<xsl:value-of select="encode-for-uri(@term)"/>
</xsl:attribute>
<span itemprop="keywords">
<xsl:call-template name="upper-case">
<xsl:with-param name="words"><xsl:choose><xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when><xsl:otherwise><xsl:value-of select="@term"/></xsl:otherwise></xsl:choose></xsl:with-param>
</xsl:call-template>
</span>
</a>
</xsl:if>
</li>
</xsl:for-each>
</ul>
</div>
</xsl:if>
<div class="clear"></div>
<h2>
<xsl:if test="$lang-ISO639-1='en'">Additional Information</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Information additionnelle</xsl:if>
</h2>
<xsl:if test="//gmd:descriptiveKeywords/gmd:MD_Keywords[gmd:type/gmd:MD_KeywordTypeCode='theme; thème' and normalize-space(gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString)!='Government of Canada Core Subject Thesaurus']">
<p id="description-keywords" class="wet-boew-texthighlight">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Keywords</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Mots-clés</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:variable name="keywordString">
<xsl:for-each select="//gmd:descriptiveKeywords/gmd:MD_Keywords[gmd:type/gmd:MD_KeywordTypeCode='theme; thème' and normalize-space(gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString)!='Government of Canada Core Subject Thesaurus']/gmd:keyword">
<xsl:if test="position() !=1">, </xsl:if><xsl:call-template name="upper-case"><xsl:with-param name="words" select="normalize-space(.)"/></xsl:call-template>
</xsl:for-each>
</xsl:variable>
<xsl:if test="string-length($keywordString) &lt; 65">
<xsl:value-of select="$keywordString"/>
</xsl:if>
<xsl:if test="string-length($keywordString) &gt; 65">
<xsl:variable name="substring" select="substring($keywordString, 1, 65)"/>
<xsl:variable name="first-half">
<xsl:value-of select="substring($substring, 1, index-of(string-to-codepoints($substring), string-to-codepoints(' ') )[last()] -2)"/>
</xsl:variable>
<xsl:variable name="second-half">
<xsl:value-of select="substring($keywordString, string-length($first-half)+1)"/>
</xsl:variable>
<span class="truncated">
<xsl:value-of select="$first-half"/><span class="show-more-text wb-invisible"><xsl:value-of select="$second-half"/></span><span class="show-more-ellipsis" aria-hidden="true">... </span>
<a aria-hidden="true" href="#" class="show-more">
<xsl:if test="$lang-ISO639-1='en'">show more</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">afficher plus</xsl:if>
</a>
</span>
</xsl:if>
</p>
</xsl:if>
<xsl:if test="atom:category[@scheme='urn:iso:series']">
<p>
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Series</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Série</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:variable name="series" select="normalize-space(atom:category[@scheme='urn:iso:series']/@label)"/>
<a rel="nofollow">
<xsl:attribute name="href">
<xsl:value-of select="concat($base-uri, substring-before(/node()/atom:link[@rel='self']/@href, //*[local-name()='entryId']))"/>-/(urn:iso:series)<xsl:value-of select="encode-for-uri(atom:category[@scheme='urn:iso:series']/@term)"/>
</xsl:attribute>
<xsl:value-of select="$series"/>
</a>
</p>
<xsl:if test="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:series/gmd:CI_Series/gmd:issueIdentification/gco:CharacterString">
<p>
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Issue</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Parution</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:value-of select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:series/gmd:CI_Series/gmd:issueIdentification/gco:CharacterString"/>
</p>
</xsl:if>
</xsl:if>
<div>
<span class="label float-left">
<xsl:if test="$lang-ISO639-1='en'">Author</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Auteur</xsl:if>
<xsl:if test="count(atom:category[@scheme='urn:atom:author']) &gt; 1">s</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:choose>
<xsl:when test="atom:category[@scheme='urn:atom:author']">
<ul class="menu-horizontal comma-seperated">
<xsl:for-each select="atom:category[@scheme='urn:atom:author']">
<li>
<!-- itemType Person -->
<span itemprop="author" itemscope="itemscope" itemtype="http://schema.org/Person">
<a rel="nofollow">
<xsl:attribute name="href">
<xsl:value-of select="concat($base-uri, substring-before(/node()/atom:link[@rel='self']/@href, //*[local-name()='entryId']))"/>-/(<xsl:value-of select="@scheme"/>)<xsl:value-of select="encode-for-uri(@term)"/>
</xsl:attribute>
<span itemprop="name"><xsl:choose><xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when><xsl:otherwise><xsl:value-of select="@term"/></xsl:otherwise></xsl:choose></span>
</a>
</span>
<!-- end itemType Person -->
</li>
</xsl:for-each>
</ul>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="normalize-space(atom:author)">
<!-- itemType Person -->
<span itemprop="author" itemscope="itemscope" itemtype="http://schema.org/Person">
<xsl:if test="position() !=1">; </xsl:if>
<span itemprop="name">
<xsl:value-of select="."/>
</span>
</span>
<!-- end itemType Person -->
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</div>
<p>
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Date published</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Date de publication</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<!--<span itemprop="datePublished" content="{atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date}">-->
<span itemprop="datePublished">
<xsl:value-of select="format-date(atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date, '[MNn] [D], [Y]', $lang, (), ())"/>
</span>
</p>
<p>
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Language</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Langue</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:variable name="product-language" select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:language/gco:CharacterString"/>
<xsl:choose>
<xsl:when test="count($product-language) &gt; 1">
<xsl:if test="$lang-ISO639-1='en'">This product is available in </xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Ce produit est aussi disponible en </xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="$lang-ISO639-1='en'">This product is only available in </xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Ce produit est seulement disponible en </xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:for-each select="$product-language">
<xsl:if test="position()!=1 and not(position()=last())">, </xsl:if>
<xsl:if test="position()=last() and position()!=1">
<xsl:if test="$lang-ISO639-1='en'"> and </xsl:if>
<xsl:if test="$lang-ISO639-1='fr'"> et en </xsl:if>
</xsl:if>
<span itemprop="inLanguage">
<xsl:choose>
<xsl:when test="contains(., 'eng')">
<xsl:if test="$lang-ISO639-1='en'">English</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">anglais</xsl:if>
</xsl:when>
<xsl:when test="contains(., 'fra')">
<xsl:if test="$lang-ISO639-1='en'">French</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">fran<xsl:text disable-output-escaping="yes"><![CDATA[&ccedil;]]></xsl:text>ais</xsl:if>
</xsl:when>
<xsl:when test="contains(., 'fre')">
<xsl:if test="$lang-ISO639-1='en'">French</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">fran<xsl:text disable-output-escaping="yes"><![CDATA[&ccedil;]]></xsl:text>ais</xsl:if>
</xsl:when>
<xsl:when test="contains(., 'rus')">
<xsl:if test="$lang-ISO639-1='en'">Russian</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Russian</xsl:if>
</xsl:when>
<xsl:when test="contains(., 'chp')">
<xsl:if test="$lang-ISO639-1='en'">Chipewyan (Dene)</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Chipewyan (Dene)</xsl:if>
</xsl:when>
<xsl:when test="contains(., 'iku')">
<xsl:if test="$lang-ISO639-1='en'">Inuktitut</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Inuktitut</xsl:if>
</xsl:when>
<xsl:when test="contains(., 'ipk')">
<xsl:if test="$lang-ISO639-1='en'">Inupiaq</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Inupiaq</xsl:if>
</xsl:when>
<xsl:when test="contains(., 'kal')">
<xsl:if test="$lang-ISO639-1='en'">Kalaallisut</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Kalaallisut</xsl:if>
</xsl:when>
<xsl:when test="contains(., 'spa')">
<xsl:if test="$lang-ISO639-1='en'">Spanish</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Espagnole</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:for-each>
</p>
</xsl:template>
<xsl:template name="make-header">
<xsl:param name="domain" />
<xsl:param name="lang-ISO639-1" />
<xsl:param name="lang" />
<xsl:param name="colon" />

<header id="header" class="wet-boew-texthighlight">
<xsl:call-template name="version-message">
<xsl:with-param name="domain" select="$domain"/>
<xsl:with-param name="lang-ISO639-1" select="$lang-ISO639-1"/>
</xsl:call-template>
<!-- Content title begins / Début du titre du contenu -->
<h1 id="wb-cont" itemprop="name" class="span-6">
<xsl:call-template name="escape">
<xsl:with-param name="text" select="atom:title"/>
</xsl:call-template>
</h1>
<!-- Content Title ends / Fin du titre du contenu -->
<div class="clear"></div>
<div class="date-added margin-bottom-medium">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Date updated</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Date de mise à jour</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:value-of select="format-dateTime(xs:dateTime(atom:updated), '[MNn] [D], [Y]', $lang, (), ())"/>
<xsl:if test="year-from-dateTime(atom:updated)=year-from-dateTime(current-dateTime()) and ((((month-from-dateTime(current-dateTime())-1)*30)+day-from-dateTime(current-dateTime()))-(((month-from-dateTime(atom:updated)-1)*30)+day-from-dateTime(atom:updated))) &lt;=30">
<xsl:if test="$lang-ISO639-1='en'"><xsl:text> </xsl:text><span class="badge-new">New</span></xsl:if>
<xsl:if test="$lang-ISO639-1='fr'"><xsl:text> </xsl:text><span class="badge-new">Nouveau</span></xsl:if>
</xsl:if>
</div>
<div class="clear"></div>
<xsl:choose>
<xsl:when test="atom:summary != ''">
<xsl:variable name="newTxt">
<xsl:if test="$lang-ISO639-1='en'">No product description provided by publisher.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Aucune description du produit n'est fournie par l'éditeur.</xsl:if>
</xsl:variable>
<xsl:variable name="oldTxt">
<xsl:if test="$lang-ISO639-1='en'">Abstract not available.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Résumé non disponible.</xsl:if>
</xsl:variable>
<xsl:if test="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic/gmd:fileName/gco:CharacterString">
<div class="float-left margin-right-medium margin-bottom-none margin-top-small span-2">
<!-- WET 3.0 Tabbed Interface -->
<div class="wet-boew-tabbedinterface tabs-style-5 animate-fast cycle">
<div class="tabs-panel">
<xsl:for-each select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic">
<div id="tab{position()}" class="wet-boew-lightbox">
<a class="lb-item" href="{gmd:fileName/gco:CharacterString}" title="{normalize-space(//atom:title)}"><img class="thumbnail" alt="{normalize-space(//atom:title)}" title="{normalize-space(//atom:title)}" src="{gmd:fileName/gco:CharacterString}"/></a>
</div>
</xsl:for-each>
</div>
<ul class="tabs">
<xsl:for-each select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic">
<li><a href="#tab{position()}">Image <xsl:value-of select="position()"/></a></li>
</xsl:for-each>
</ul>
</div>
<!-- END WET 3.0 Tabbed Interface -->
</div>
</xsl:if>
<p id="description" itemprop="description" class="margin-top-none">
<xsl:variable name="desc">
<xsl:call-template name="escape">
<xsl:with-param name="text" select="normalize-space(replace(atom:summary, $oldTxt, $newTxt ))"/>
</xsl:call-template>
</xsl:variable>
<xsl:if test="string-length($desc) &lt; 1000">
<xsl:value-of select="$desc"/>
</xsl:if>
<xsl:if test="string-length($desc) &gt; 1000">
<xsl:variable name="substring" select="substring($desc, 1, 1000)"/>
<xsl:variable name="first-half">
<xsl:value-of select="substring($substring, 1, index-of(string-to-codepoints($substring), string-to-codepoints(' ') )[last()] -1)"/>
</xsl:variable>
<xsl:variable name="second-half">
<xsl:value-of select="substring($desc, string-length($first-half)+1)"/>
</xsl:variable>
<span class="truncated">
<xsl:value-of select="$first-half"/><span class="show-more-text wb-invisible"><xsl:value-of select="$second-half"/></span><span class="show-more-ellipsis" aria-hidden="true">... </span>
<a class="show-more" aria-hidden="true" href="#">
<xsl:if test="$lang-ISO639-1='en'">show more</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">afficher plus</xsl:if>
</a>
</span>
</xsl:if>
</p>
</xsl:when>
<xsl:otherwise>
<div class="module-note">
<xsl:if test="$lang-ISO639-1='en'">
<p><strong>Note:</strong> No product description provided by publisher.</p>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<p><strong>Note :</strong> Aucune description du produit n'est fournie par l'éditeur.</p>
</xsl:if>
</div>
</xsl:otherwise>
</xsl:choose>
<div class="clear"></div>
</header>
</xsl:template>

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

ATOM Feed

***********************************************************************************************************************************************
-->
<xsl:key name="atom-category" match="atom:entry/atom:category" use="@term" />
<xsl:template name="atom-feed" match="atom:feed">
<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html>&#10;</xsl:text>
<xsl:variable name="base-uri" select="/node()/@xml:base"/>
<xsl:variable name="lang-ISO639-1">
<xsl:choose>
<xsl:when test="$lang='fr'">fr</xsl:when>
<xsl:otherwise>en</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="lang-ISO639-2">
<xsl:choose>
<xsl:when test="$lang='fr'">fre</xsl:when>
<xsl:otherwise>eng</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="domain">
<xsl:variable name="t" select="tokenize(substring-after(concat($base-uri, atom:link[@rel='self']/@href), 'http://'), '/|:')"/>
<xsl:choose>
<xsl:when test="$t[1]='localhost'">dev</xsl:when>
<xsl:when test="$t[1]='dev.geogratis.gc.ca'">dev</xsl:when>
<xsl:when test="$t[3]='beta'">beta</xsl:when>
<xsl:otherwise>prod</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="colon">
<xsl:choose>
<xsl:when test="$lang-ISO639-1='fr'"> :</xsl:when>
<xsl:otherwise>:</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="base-uri" select="$base-uri"/>
<!-- Begin Interactive Filters -->
<!--<!-\- Parse the querystring parameters into a node-set -\->
<xsl:variable name="parameters">
<xsl:for-each
select="tokenize(substring-after(atom:link[@rel='self']/@href, '?'), '&amp;')">
<param name="{lower-case(substring-before(.,'='))}"
value="{substring-after(.,'=')}"/>
</xsl:for-each>
</xsl:variable>
<!-\- End Parse the querystring parameters into a node-set -\->-->
<!-- Parse the querystring parameters into a node-set -->
<xsl:variable name="parameters">
<xsl:for-each select="tokenize(substring-after(atom:link[@rel='self']/@href, '?'), '&amp;')">
<xsl:variable name="param" select="lower-case(substring-before(.,'='))"/>
<xsl:variable name="value" select="substring-after(.,'=')"/>
<!-- xsl:if test="$param!='q' and $param!='locale' and $param!='start-index' and $param!='entry-type'" -->
<param name="{$param}" value="{$value}"/>
<!-- /xsl:if -->
</xsl:for-each>
</xsl:variable>
<!-- End Parse the querystring parameters into a node-set -->
<!-- Parse category filters into node-set -->
<xsl:variable name="first-part" select="substring-before(atom:link[@rel='self']/@href, '/-/')"/>
<xsl:variable name="bool-part" select="substring-before(substring-after(atom:link[@rel='self']/@href, '/-/'), '(')"/>
<xsl:variable name="middle-part">
<xsl:choose>
<xsl:when test="$bool-part!=''">
<xsl:choose>
<xsl:when test="count($parameters/param) &gt; 0">
<xsl:value-of select="substring-after(substring-before(atom:link[@rel='self']/@href, '?'), $bool-part)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-after(atom:link[@rel='self']/@href, $bool-part)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="count($parameters/param) &gt; 0">
<xsl:value-of select="substring-after(substring-before(atom:link[@rel='self']/@href, '?'), '/-/')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-after(atom:link[@rel='self']/@href, '/-/')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="entry-categories" select="atom:entry[1]/atom:category"/>
<xsl:variable name="category-filters">
<xsl:for-each select="tokenize($middle-part, '/')">
<xsl:variable name="term" select="substring-after(.,')')"/>
<xsl:variable name="scheme" select="lower-case(substring-before(substring-after(., '('), ')'))"/>
<xsl:variable name="matching-label" select="$entry-categories[@term=$term]/@label"/>
<xsl:variable name="label">
<xsl:choose>
<xsl:when test="$scheme='urn:iso:type'">
<!-- xsl:if test="$matching-label='mapDigital; carteNumérique' or $matching-label='mapDigital' or $matching-label='carteNumérique'"><xsl:if test="$lang-ISO639-1='en'">Map Data</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Données cartographiques</xsl:if></xsl:if>
<xsl:if test="$matching-label='imageDigital; imageNumérique' or $matching-label='imageDigital' or $matching-label='imageNumérique'">Image/Photo</xsl:if>
<xsl:if test="$matching-label='modelDigital; modèleNumérique' or $matching-label='modelDigital' or $matching-label='modèleNumérique'"><xsl:if test="$lang-ISO639-1='en'">Elevation Data</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Données d'élévation</xsl:if></xsl:if>
<xsl:if test="$matching-label='documentDigital; documentNumérique' or $matching-label='documentDigital' or $matching-label='documentNumérique'">Document</xsl:if>
<xsl:if test="$matching-label='tableDigital; tableNumérique' or $matching-label='tableDigital' or $matching-label='tableNumérique'">Table</xsl:if>
<xsl:if test="$matching-label='profileDigital; profilNumérique' or $matching-label='profilNumérique' or $matching-label='profileDigital'">Profile</xsl:if -->
<xsl:value-of select="$matching-label"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$matching-label!=''">
<xsl:value-of select="concat(upper-case(substring($matching-label,1,1)), substring($matching-label, 2),' '[not(last())])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(upper-case(substring(replace($term, '-', ' '),1,1)), substring(replace($term, '-', ' '), 2),' '[not(last())])"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<filter scheme="{$scheme}" term="{$term}" label="{$label}"/>
</xsl:for-each>
</xsl:variable>
<!-- End Parse category filters into node-set -->
<!--<!-\- Parse the querystring parameters into a node-set -\->
<xsl:variable name="parameters">
<xsl:for-each select="tokenize(substring-after(atom:link[@rel='self']/@href, '?'), '&amp;')">
<xsl:variable name="param" select="lower-case(substring-before(.,'='))"/>
<xsl:variable name="value" select="substring-after(.,'=')"/>
<xsl:if test="$param!='locale' and $param!='start-index' and $param!='entry-type'">
<param name="{$param}" value="{$value}"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<!-\- End Parse the querystring parameters into a node-set -\->-->
<xsl:variable name="querystring">
<xsl:for-each select="$parameters/param">
<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/>
<xsl:if test="position()!=last()">&amp;</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="uriSelf">
<xsl:value-of select="concat(substring-before(atom:link[@rel='self']/@href, '?'), '?', $querystring)"/>
</xsl:variable>
<xsl:if test="$lang-ISO639-1='en'">
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if IE 7]><html lang="en" class="no-js ie7"><![endif]-->]]></xsl:text>
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if IE 8]><html lang="en" class="no-js ie8"><![endif]-->]]></xsl:text>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if IE 7]><html lang="fr" class="no-js ie7"><![endif]-->]]></xsl:text>
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if IE 8]><html lang="fr" class="no-js ie8"><![endif]-->]]></xsl:text>
</xsl:if>
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if gt IE 8]><!-->]]>
</xsl:text>
<html lang="{$lang-ISO639-1}" class="no-js">
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--<![endif]-->]]></xsl:text>
<head>
<meta charset="utf-8"/>
<meta name="robots" content="noindex, follow"/>
<!-- Title begins / Début du titre -->
<title>
<xsl:if test="$lang-ISO639-1='en'">GeoGratis - Product Selection</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">GeoGratis - Sélection de produits</xsl:if>
</title>
<!-- Title ends / Fin du titre -->

<!-- Favicon (optional) begins / Début du favicon (optionnel) -->
<link rel="shortcut icon" href="/theme-gcwu-fegc/fip-pcim/images/favicon.ico"/>
<!-- Favicon (optional) ends / Fin du favicon (optionnel) -->
<link rel="canonical">
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri" select="concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)"/>
</xsl:call-template>
</xsl:attribute>
</link>
<!--<link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
<link rel="schema.dcterms" href="http://purl.org/dc/terms/" />-->
<xsl:if test="atom:link[@rel='search']">
<link rel="search" type="application/opensearchdescription+xml" href="{concat($base-uri, atom:link[@rel='search']/@href)}" title="{atom:link[@rel='search']/@title}"/>
</xsl:if>
<xsl:if test="atom:link[@rel='alternate'][@type='application/rss+xml']">
<link rel="alternate" type="application/rss+xml" href="{concat($base-uri, atom:link[@rel='alternate'][@type='application/rss+xml']/@href)}"/>
</xsl:if>
<!-- Meta-data begins / Début des métadonnées -->
<meta name="description">
<xsl:attribute name="content">
<xsl:if test="$lang-ISO639-1='en'">Access and download at no cost geospatial data for all of Canada</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Accédez et téléchargez sans frais des données géospatiales de l'ensemble du territoire canadien</xsl:if>
</xsl:attribute>
</meta>
<meta name="dcterms.creator">
<xsl:attribute name="content">
<xsl:if test="$lang-ISO639-1='en'">Government of Canada, Natural Resources Canada</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Gouvernement du Canada, Ressources naturelles Canada</xsl:if>
</xsl:attribute>
</meta>
<meta name="dcterms.title">
<xsl:attribute name="content">
<xsl:if test="$lang-ISO639-1='en'">Geogratis - Product Selection</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">GeoGratis - Sélection de produits</xsl:if>
</xsl:attribute>
</meta>
<meta name="dcterms.issued" title="W3CDTF" content="{atom:updated}"/>
<meta name="dcterms.modified" content="{atom:updated}"/>
<meta name="dcterms.subject" title="scheme">
<xsl:attribute name="content">
<xsl:if test="$lang-ISO639-1='en'">Geomatics;Mapping data;Maps;Remote Sensing;Cartography;Geographic information systems;Topographical maps;Satellites;Aerial photography</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Géomatique;Données cartographiques;Carte;Télédétection;Cartographie;Système d'information géographique;Carte topographique;Satellite;Photographie aérienne</xsl:if>
</xsl:attribute>
</meta>
<meta name="dcterms.language" title="ISO639-2" content="{$lang-ISO639-2}"/>
<!-- Meta-data ends / Fin des métadonnées -->

<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="/build-3.0.2/js/jquery.min.js"></script>
<xsl:text disable-output-escaping="yes">
<![CDATA[<!--[if lte IE 8]>
<script src="/build-3.0.2/js/polyfills/html5shiv-min.js"></script>
<link rel="stylesheet" href="/build-3.0.2/grids/css/util-ie-min.css" />
<link rel="stylesheet" href="/build-3.0.2/js/css/pe-ap-ie-min.css" />
<link rel="stylesheet" href="/build-3.0.2/theme-gcwu-fegc/css/theme-ie-min.css" />
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="/build-3.0.2/grids/css/util-min.css" />
<link rel="stylesheet" href="/build-3.0.2/js/css/pe-ap-min.css" />
<link rel="stylesheet" href="/build-3.0.2/theme-gcwu-fegc/css/theme-min.css" />
<!--<![endif]-->]]></xsl:text>
<noscript>
<link href="/build-3.0.2/theme-gcwu-fegc/css/theme-ns-min.css" rel="stylesheet"/>
</noscript>
<!-- CustomScriptsCSSStart -->
<link href="/geogratis-api-1.3.0/css/geogratis.min.css" rel="stylesheet"/>
<!-- CustomScriptsCSSEnd -->

<!-- C ustom scripts/CSS begin / Début des scripts/CSS personnalisés -->
<!-- Custom scripts/CSS end / Fin des scripts/CSS personnalisés -->
</head>
<body itemscope="itemscope" itemtype="http://schema.org/SearchResultsPage">
<div id="wb-body">
<xsl:call-template name="header">
<xsl:with-param name="lang-ISO639-1" select="$lang-ISO639-1"/>
<xsl:with-param name="domain" select="$domain"/>
</xsl:call-template>
<div id="wb-core"><div id="wb-core-in" class="equalize">
<div id="wb-main" role="main"><div id="wb-main-in">
<!-- MainContentStart -->
<div class="span-6">
<xsl:call-template name="version-message">
<xsl:with-param name="domain" select="$domain"/>
<xsl:with-param name="lang-ISO639-1" select="$lang-ISO639-1"/>
</xsl:call-template>
<h1 id="wb-cont" itemprop="name" class="span-6">
<xsl:if test="$lang-ISO639-1='en'">Product Selection</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Sélection de produits</xsl:if>
<span class="position-right">
<xsl:if test="//atom:entry">
<a>
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri" select="concat($base-uri, atom:link[@rel='alternate'][@type='application/rss+xml']/@href)"/>
</xsl:call-template>
</xsl:attribute>
<img id="subscribe" src="/build-3.0.2/theme-gcwu-fegc/images/sl_feeds.png">
<xsl:attribute name="alt">
<xsl:if test="$lang-ISO639-1='en'">Feed</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Flux</xsl:if>
</xsl:attribute>
</img>
</a>
</xsl:if>
</span>
</h1>
<div class="span-6 margin-bottom-medium">
<xsl:if test="//atom:feed">
<div id="search-filters">
<!--
BBox filter
-->
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, 'bbox=')">
<xsl:variable name="bbox">
<xsl:call-template name="clean-bbox">
<xsl:with-param name="list">
<xsl:value-of select="$parameters/param[@name='bbox']/@value"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="querystring">
<xsl:for-each select="$parameters/param">
<xsl:if test="@name!='bbox' and @name!='locale' and @name!=start-index"><xsl:value-of select="@name"/>=<xsl:value-of select="@value"/>&amp;</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="title"><xsl:if test="$lang-ISO639-1='en'">Remove geographic filter</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Enlever le filtre géographique</xsl:if>
</xsl:variable>
<span class="filter background-light">
<a href="{concat($base-uri, substring-before(atom:link[@rel='self']/@href, '?'), '?', normalize-space($querystring)) }" rel="nofollow" class="filter-remove bbox" title="{$title}"><span class="wb-invisible"><xsl:value-of select="$title" /></span></a><span aria-hidden="true"><xsl:if test="$lang-ISO639-1='en'">Geographic filter</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Filtre géographique</xsl:if><xsl:value-of select="$colon"/> <xsl:value-of select="$bbox"/></span>
</span>
</xsl:when>
</xsl:choose>
<!--
Category filter
-->
<!-- <xsl:choose>
<xsl:when test="count($category-filters/filter) &gt; 0">
<xsl:for-each select="$category-filters/filter">
<xsl:variable name="category-term" select="@term"/>
<xsl:variable name="category-query">
<xsl:if test="count($category-filters/filter[@term!=$category-term])&gt;0">
<xsl:text>/-/</xsl:text>
</xsl:if>
<xsl:for-each select="$category-filters/filter[@term!=$category-term]">
<xsl:if test="position()!=last()">
<xsl:text>AND/</xsl:text></xsl:if>
</xsl:for-each>
<xsl:for-each select="$category-filters/filter[@term!=$category-term]">
<xsl:text>(</xsl:text><xsl:value-of select="@scheme"/><xsl:text>)</xsl:text><xsl:value-of select="@term"/>
<xsl:if test="position()!=last()"><xsl:text>/</xsl:text></xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="filter-link" xml:space="default">
<xsl:value-of select="$first-part"/><xsl:value-of select="$category-query"/><xsl:if test="$querystring!=''">?<xsl:value-of select="$querystring"/></xsl:if>
</xsl:variable>
<xsl:variable name="filter-prompt">
<xsl:if test="$lang-ISO639-1='en'">Remove filter</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Enlever le filtre</xsl:if>
</xsl:variable>
<xsl:variable name="filter-type">
<xsl:choose>
<xsl:when test="@scheme='urn:iso:keyword'">Tag</xsl:when>
<xsl:when test="@scheme='urn:atom:author'"><xsl:if test="$lang-ISO639-1='en'">Author</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Auteur</xsl:if></xsl:when>
<xsl:when test="@scheme='urn:iso:place'"><xsl:if test="$lang-ISO639-1='en'">Region</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Région</xsl:if></xsl:when>
<xsl:when test="@scheme='urn:iso:series'"><xsl:if test="$lang-ISO639-1='en'">Series</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Série</xsl:if></xsl:when>
<xsl:when test="@scheme='urn:gc:subject'"><xsl:if test="$lang-ISO639-1='en'">Subject</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Sujet</xsl:if></xsl:when>
<xsl:when test="@scheme='urn:iso:format'">Format</xsl:when>
<xsl:when test="@scheme='urn:iso:type'">Type</xsl:when>
<xsl:otherwise>Category</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<span class="filter background-light">
<a href="{concat($base-uri, $filter-link)}" rel="nofollow" class="filter-remove category" title="{$filter-prompt} {$filter-type}{$colon} {@label}"><span class="wb-invisible"><xsl:value-of select="$filter-prompt"/><xsl:text> </xsl:text><xsl:value-of select="$filter-type"/><xsl:value-of select="$colon"/><xsl:text> </xsl:text><xsl:value-of select="@label"/></span></a><span aria-hidden="true" class="wrap-none"><xsl:value-of select="$filter-type"/><xsl:value-of select="$colon"/><xsl:text> </xsl:text><xsl:value-of select="@label"/></span>
</span>
</xsl:for-each>
</xsl:when>
</xsl:choose>-->
<!--
Search filter
Note: variable $q is passed into the stylesheet
-->
<!-- <xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, 'q=')">
<xsl:variable name="link" select="atom:link[@rel='self']/@href"/>
<xsl:variable name="keyword-string" select="normalize-space(replace($q, '(%20)*-(%20)*|(\+)*-(\+)*|(\s)*-(\s)*|\+|%20', ' '))"/>
<!-\- remove the q and locale parameters BUT THIS IS ALREADY DONE!!! -\->
<xsl:variable name="partial-querystring">
<!-\-<xsl:for-each select="$parameters/param">
<xsl:if test="@name!='q' and @name!='locale' and @name!=start-index"><xsl:value-of select="@name"/>=<xsl:value-of select="@value"/>&amp;</xsl:if>
</xsl:for-each>-\->
<xsl:for-each select="$parameters/param">
<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/>&amp;
</xsl:for-each>
</xsl:variable>
<xsl:variable name="title">
<xsl:if test="$lang-ISO639-1='en'">Remove keyword filter</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Enlever le filtre mot-clé</xsl:if>
</xsl:variable>
<xsl:for-each select="tokenize($keyword-string, ' ')">
<xsl:variable name="key">
<xsl:sequence select="replace($keyword-string, concat('(^|\W)', .,'(\W|$)'), concat('$1', '','$2'))"/>
</xsl:variable>
<span class="filter background-light">
<a href="{concat($base-uri, substring-before($link, '?'), '?', normalize-space($partial-querystring), 'q=', $key)}" rel="nofollow" class="filter-remove keyword" title="{$title} {replace(., '%.(\w)', '')}"><span class="wb-invisible"><xsl:value-of select="$title"/> <xsl:value-of select="replace(., '%.(\w)', '')"/></span></a><span aria-hidden="true"><xsl:if test="$lang-ISO639-1='en'">Keyword</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Mot-clé</xsl:if>: <xsl:value-of select="replace(., '%.(\w)', '')"/></span>
</span>
</xsl:for-each>
</xsl:when>
</xsl:choose>-->
<!-- End Interactive Filters -->
</div>
<!-- <div class="span-2 row-start font-large margin-bottom-small">
<span class="align-middle">
<xsl:if test="//atom:entry">
<xsl:if test="*[local-name()='totalResults'] &gt; 5000">
<!-\- if "About" is meant as "Approximately" then "À propos de" is wrong; use "Environ" instead - B.C. -\->
<xsl:if test="$lang-ISO639-1='en'">About </xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Environ </xsl:if>
</xsl:if>
<xsl:value-of select="format-number(*[local-name()='totalResults'], '###,###,###')"/>
<xsl:if test="$lang-ISO639-1='en'"> result<xsl:if test="*[local-name()='totalResults'] &gt; 1">s</xsl:if></xsl:if>
<xsl:if test="$lang-ISO639-1='fr'"> résultat<xsl:if test="*[local-name()='totalResults'] &gt; 1">s</xsl:if></xsl:if>
</xsl:if>
</span>
</div>
<div class="span-4 row-end align-right margin-bottom-small">
<xsl:if test="*[local-name()='totalResults'] &gt; 0">
<span class="align-middle">
<xsl:choose>
<xsl:when test="not(//atom:content)">
<a class="button">
<xsl:attribute name="href">
<xsl:value-of select="$base-uri"/>
<xsl:call-template name="clean-uri"><xsl:with-param name="uri" select="atom:link[@rel='self']/@href"/></xsl:call-template>
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, '?')">&amp;entry-type=full</xsl:when>
<xsl:otherwise>?entry-type=full</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="$lang-ISO639-1='en'">Load Details</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Afficher plus d'informations</xsl:if>
</a>
</xsl:when>
<xsl:otherwise>
<a class="button">
<xsl:attribute name="href">
<xsl:value-of select="$base-uri"/>
<xsl:call-template name="clean-uri"><xsl:with-param name="uri" select="replace(atom:link[@rel='self']/@href, '&amp;entry-type=full|entry-type=full&amp;|\?entry-type=full', '' )"/></xsl:call-template>
</xsl:attribute>
<xsl:if test="$lang-ISO639-1='en'">Hide Details</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Afficher moins d'informations</xsl:if>
</a>
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:if>
</div>-->
</xsl:if>
</div>
<xsl:choose>
<xsl:when test="//atom:entry">
<div class="span-6">
<p class="wb-invisible">
<xsl:if test="$lang-ISO639-1='en'">The results below are in a two-column table. The left column provides the result numbers and the right column provides the actual results. Each row contains one result.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Les résultats ci-dessous sont dans un tableau à deux colonnes. La colonne de gauche indique le nombre de résultats et la colonne de droite contient les résultats réels. Chaque ligne contient un résultat.</xsl:if>
</p>
<table id="products" class="table-simplify wet-boew-texthighlight">
<xsl:attribute name="title">
<xsl:if test="$lang-ISO639-1='en'">GeoGratis product selection</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Sélection de produits GeoGratis</xsl:if>
</xsl:attribute>
<thead class="wb-invisible">
<tr class="border-none">
<th id="position" scope="col"/>
<th id="title" scope="col">
<xsl:if test="$lang-ISO639-1='en'">Title</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Titre</xsl:if>
</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="atom:entry">
<tr>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">table-odd<xsl:if test="position()=1"> first</xsl:if></xsl:when>
<xsl:otherwise>table-even</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td class="position border-none font-large" headers="position">
<xsl:value-of select="position()"/>.
</td>
<td class="title border-none" headers="title">
<a class="font-large">
<xsl:attribute name="href">
<xsl:value-of select="$base-uri"/>
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri" select="atom:link[@type='text/html']/@href"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="escape">
<xsl:with-param name="text" select="atom:title"/>
</xsl:call-template>
</a>
<xsl:if test="year-from-dateTime(atom:updated)=year-from-dateTime(current-dateTime()) and ((((month-from-dateTime(current-dateTime())-1)*30)+day-from-dateTime(current-dateTime()))-(((month-from-dateTime(atom:updated)-1)*30)+day-from-dateTime(atom:updated))) &lt;=30">
<xsl:if test="$lang-ISO639-1='en'"><xsl:text> </xsl:text><span class="badge-new">New</span></xsl:if>
<xsl:if test="$lang-ISO639-1='fr'"><xsl:text> </xsl:text><span class="badge-new">Nouveau</span></xsl:if>
</xsl:if>
<div class="description margin-top-medium margin-bottom-medium">
<xsl:variable name="newTxt">
<xsl:if test="$lang-ISO639-1='en'">No product description provided by publisher.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Aucune description du produit n'est fournie par l'éditeur.</xsl:if>
</xsl:variable>
<xsl:variable name="oldTxt">
<xsl:if test="$lang-ISO639-1='en'">Abstract not available.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Résumé non disponible.</xsl:if>
</xsl:variable>
<xsl:variable name="desc">
<xsl:call-template name="escape">
<xsl:with-param name="text" select="normalize-space(replace(atom:summary, $oldTxt, $newTxt ))"/>
</xsl:call-template>
</xsl:variable>
<xsl:if test="atom:content">
<xsl:if test="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic">
<div class="float-left span-2 margin-bottom-medium wet-boew-lightbox">
<xsl:choose>
<xsl:when test="count(atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic) &gt; 1">
<!-- WET 3.0 Tabbed Interface -->
<div class="wet-boew-tabbedinterface tabs-style-5 animate-fast cycle">
<div class="tabs-panel">
<xsl:for-each select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic">
<div id="tab{position()}" class="wet-boew-lightbox">
<a class="lb-item" href="{gmd:fileName/gco:CharacterString}" title="{normalize-space(atom:title)}"><img class="thumbnail" alt="{normalize-space(atom:title)}" title="{normalize-space(atom:title)}" src="{gmd:fileName/gco:CharacterString}"/></a>
</div>
</xsl:for-each>
</div>
<ul class="tabs">
<xsl:for-each select="atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic">
<li><a href="#tab{position()}">Image <xsl:value-of select="position()"/></a></li>
</xsl:for-each>
</ul>
</div>
<!-- END WET 3.0 Tabbed Interface -->
</xsl:when>
<xsl:otherwise>
<a class="lb-item" href="{atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview[1]/gmd:MD_BrowseGraphic/gmd:fileName/gco:CharacterString}">
<xsl:attribute name="title">
<xsl:if test="$lang-ISO639-1='en'">Thumbnail image of product.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Vignette du produit.</xsl:if>
</xsl:attribute>
<img itemprop="image" class="thumbnail" src="{atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview[1]/gmd:MD_BrowseGraphic/gmd:fileName/gco:CharacterString}">
<xsl:attribute name="alt">
<xsl:if test="$lang-ISO639-1='en'">Thumbnail image of product.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Vignette du produit.</xsl:if>
</xsl:attribute>
</img>
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
</xsl:if>
<xsl:if test="string-length($desc) &lt; 350">
<xsl:value-of select="$desc"/>
</xsl:if>
<xsl:if test="string-length($desc) &gt; 350">
<xsl:variable name="substring" select="substring($desc, 1, 350)"/>
<xsl:value-of select="substring($substring, 1, index-of(string-to-codepoints($substring), string-to-codepoints(' '))[last()] -1)"/>...
<a>
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri" select="concat($base-uri, atom:link[@type='text/html']/@href)"/>
</xsl:call-template>
</xsl:attribute>
<xsl:if test="$lang-ISO639-1='en'">show more <span class="wb-invisible">about <xsl:value-of select="normalize-space(atom:title)"/></span></xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">afficher plus <span class="wb-invisible">au sujet de <xsl:value-of select="normalize-space(atom:title)"/></span></xsl:if>
</a>
</xsl:if>
</div>
<div class="clear"></div>
<xsl:if test="atom:category[@scheme='urn:iso:series']">
<div class="margin-top-small">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Series</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Série</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:value-of select="atom:category[@scheme='urn:iso:series']/@label"/>
</div>
</xsl:if>
<xsl:if test="atom:content">
<div class="margin-bottom-small">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Date published</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Date de publication</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:value-of select="format-date(atom:content/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date, '[MNn] [D], [Y]', $lang, (), ())"/>
</div>
</xsl:if>
<div class="margin-bottom-small">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">Product type</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Type de produit</xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:for-each select="atom:category[@scheme='urn:iso:type']">
<xsl:if test="position()!=1">, </xsl:if>
<!-- xsl:if test="@label='mapDigital; carteNumérique' or @label='mapDigital' or @label='carteNumérique'"><xsl:if test="$lang-ISO639-1='en'">Map Data</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Données cartographiques</xsl:if></xsl:if>
<xsl:if test="@label='imageDigital; imageNumérique' or @label='imageDigital' or @label='imageNumérique'">Image/Photo</xsl:if>
<xsl:if test="@label='modelDigital; modèleNumérique' or @label='modelDigital' or @label='modèleNumérique'"><xsl:if test="$lang-ISO639-1='en'">Elevation Data</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Données d'élévation</xsl:if></xsl:if>
<xsl:if test="@label='documentDigital; documentNumérique' or @label='documentDigital' or @label='documentNumérique'">Document</xsl:if>
<xsl:if test="@label='tableDigital; tableNumérique' or @label='tableDigital' or @label='tableNumérique'">Table</xsl:if>
<xsl:if test="@label='profileDigital; profilNumérique' or @label='profilNumérique' or @label='profileDigital'">Profile</xsl:if -->
<xsl:value-of select="@label"/>
</xsl:for-each>
</div>
<xsl:if test="atom:category[@scheme='urn:iso:format']">
<div class="margin-bottom-small">
<span class="label">
<xsl:if test="$lang-ISO639-1='en'">File format<xsl:if test="count(atom:category[@scheme='urn:iso:format']) &gt; 1">s</xsl:if></xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Format<xsl:if test="count(atom:category[@scheme='urn:iso:format']) &gt; 1">s</xsl:if> de fichier<xsl:if test="count(atom:category[@scheme='urn:iso:format']) &gt; 1">s</xsl:if></xsl:if>
<xsl:value-of select="$colon"/>
</span>
<xsl:for-each select="atom:category[@scheme='urn:iso:format']">
<xsl:if test="position() !=1">, </xsl:if>
<xsl:value-of select="@label"/>
</xsl:for-each>
</div>
</xsl:if>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
<div class="span-6">
<div id="page-navigation" class="margin-top-medium">
<xsl:if test="atom:link[@rel='next']">
<a class="button button-accent">
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri" select="concat($base-uri, atom:link[@rel='next']/@href)"></xsl:with-param>
</xsl:call-template>
</xsl:attribute>
<xsl:if test="$lang-ISO639-1='en'">Next</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Suivant</xsl:if>
<span class="wb-invisible">
<xsl:value-of select="$colon"/><xsl:text> </xsl:text>
<xsl:if test="$lang-ISO639-1='en'">Next page</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Page suivante</xsl:if>
</span>
</a>
</xsl:if>
</div>
<div class="clear"></div>
<div id="page-size" class="margin-top-medium">
<xsl:if test="*[local-name()='totalResults'] &gt; 10">
<xsl:if test="$lang-ISO639-1='en'">Items per page</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Nombre d'items par page</xsl:if>
<xsl:value-of select="$colon"/><xsl:text> </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri">
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, 'max-results=')">
<xsl:value-of select="concat($base-uri, replace(atom:link[@rel='self']/@href, 'max-results=[0-9]*', 'max-results=10'))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($base-uri, atom:link[@rel='self']/@href)"/>
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, '?')">&amp;max-results=10</xsl:when>
<xsl:otherwise>?max-results=10</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param></xsl:call-template></xsl:attribute>10</a>
<xsl:text> </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri">
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, 'max-results=')">
<xsl:value-of select="concat($base-uri, replace(atom:link[@rel='self']/@href, 'max-results=[0-9]*', 'max-results=25'))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($base-uri, atom:link[@rel='self']/@href)"/>
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, '?')">&amp;max-results=25</xsl:when>
<xsl:otherwise>?max-results=25</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param></xsl:call-template></xsl:attribute>25</a>
<xsl:text> </xsl:text>
<xsl:if test="*[local-name()='totalResults'] &gt; 25">
<a>
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri">
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, 'max-results=')">
<xsl:value-of select="concat($base-uri, replace(atom:link[@rel='self']/@href, 'max-results=[0-9]*', 'max-results=50'))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($base-uri, atom:link[@rel='self']/@href)"/>
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, '?')">&amp;max-results=50</xsl:when>
<xsl:otherwise>?max-results=50</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param></xsl:call-template></xsl:attribute>50</a>
<xsl:text> </xsl:text>
</xsl:if>
<xsl:if test="*[local-name()='totalResults'] &gt; 50">
<a>
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri">
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, 'max-results=')">
<xsl:value-of select="concat($base-uri, replace(atom:link[@rel='self']/@href, 'max-results=[0-9]*', 'max-results=100'))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($base-uri, atom:link[@rel='self']/@href)"/>
<xsl:choose>
<xsl:when test="contains(atom:link[@rel='self']/@href, '?')">&amp;max-results=100</xsl:when>
<xsl:otherwise>?max-results=100</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param></xsl:call-template></xsl:attribute>100</a>
</xsl:if>
</xsl:if>
</div>
</div>
</div>
</xsl:when>
<xsl:otherwise>
<div class="span-6 module-attention">
<h4>
<xsl:if test="$lang-ISO639-1='en'">No products found!</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Aucun produits trouvé!</xsl:if>
</h4>
<p>
<xsl:if test="$lang-ISO639-1='en'">We couldn't find any products matching your filter criteria.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Nous n'avons pas trouvé de produits correspondant à vos critères de filtrage.</xsl:if>
</p>
</div>
</xsl:otherwise>
</xsl:choose>
</div>
<div class="span-2">
<aside id="complementary" role="complementary">
<xsl:if test="/node()/atom:entry">
<section>
<div id="share" class="span-2 margin-bottom-small">
<xsl:call-template name="share">
<xsl:with-param name="lang-ISO639-1" select="$lang-ISO639-1"/>
<xsl:with-param name="url">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri" select="concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</div>
</section>
<section>
<div id="alternate-formats" class="span-2 margin-top-small">
<h2 class="background-accent">
<xsl:if test="$lang-ISO639-1='en'">Alternate Formats</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Formats alternatifs</xsl:if>
</h2>
<div class="module">
<p>
<xsl:if test="$lang-ISO639-1='en'">Get this list of products in another format. Current format is HTML.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Obtenez cette liste de produits dans un autre format. Le format actuel est HTML.</xsl:if>
</p>
<xsl:call-template name="alternate-representations"/>
</div>
</div>
</section>
</xsl:if>
<section>
<div id="developer" class="span-2">
<h2 class="background-accent">
<xsl:if test="$lang-ISO639-1='en'">Developers</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Développeurs</xsl:if>
</h2>
<div class="module">
<xsl:if test="$lang-ISO639-1='en'">
<p>Access our metadata and products using our REST API.</p>
<p class="align-center"><a href="http://geogratis.gc.ca/api/en/" title="GeoGratis API">GeoGratis API</a></p>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<p>Accéder à nos métadonnées et produits en utilisant notre API REST.</p>
<p class="align-center"><a href="http://geogratis.gc.ca/api/fr/" title="API GeoGratis">API GeoGratis</a></p>
</xsl:if>
</div>
</div>
</section>
<xsl:if test="//atom:entry">
<section>
<div id="qr" class="span-2">
<div id="qrcode" class="align-center"></div>
</div>
</section>
</xsl:if>
</aside>
</div>
<div class="clear"/>
<!-- Date Modified begins / Début de la date de modification -->
<dl id="gcwu-date-mod" role="contentinfo">
<dt>
<xsl:if test="$lang-ISO639-1='en'">Date modified</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Date de modification</xsl:if>
<xsl:value-of select="$colon"/>
</dt>
<dd>
<!--<span itemprop="dateModified" content="{substring-before(atom:updated, 'T')}">-->
<span itemprop="dateModified">
<time><xsl:value-of select="substring-before(atom:updated, 'T')"/></time>
</span>
</dd>
</dl>
<div class="clear"/>
<!-- Date Modified ends / Fin de la date de modification -->
<!-- GC Web Usability theme ends / Fin du thème de la facilité d'emploi GC -->
</div>
</div>
<!-- Main content ends / Fin du contenu principal -->
</div>
</div>
<!-- Columns end / Fin des colonnes -->
<xsl:call-template name="footer">
<xsl:with-param name="lang-ISO639-1" select="$lang-ISO639-1"/>
</xsl:call-template>
</div>
<!-- ScriptsStart -->
<script src="/build-3.0.2/theme-gcwu-fegc/js/theme-min.js"></script>
<script src="/build-3.0.2/js/settings.js"></script>
<script src="/build-3.0.2/js/pe-ap-min.js"></script>
<script src="/geogratis-api-1.3.0/js/jquery.qrcode.min.js"></script>
<script src="/geogratis-api-1.3.0/js/geogratis.min.js"></script>
<!-- ScriptsEnd -->
<xsl:call-template name="piwik">
<xsl:with-param name="domain" select="$domain"/>
</xsl:call-template>
<script><xsl:text>
/* &lt;![CDATA[ */
$(document).ready(function(){var recentItemsContext={};initRecentItems(recentItemsContext);var totalResults='</xsl:text><xsl:value-of select="*[local-name()='totalResults']"/><xsl:text>';if(totalResults &amp;&amp; totalResults &gt; 0){var qrcodeContext={'uri':'</xsl:text><xsl:value-of select="concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)"/><xsl:text>&amp;pk_campaign=qrcode'};initQRCode(qrcodeContext);};var pagerContext={'uriSelf':'</xsl:text><xsl:value-of select="$uriSelf"/><xsl:text>','totalResults':'</xsl:text><xsl:value-of select="*[local-name()='totalResults']"/><xsl:text>','currentIndex':'</xsl:text><xsl:value-of select="*[local-name()='startIndex']"/><xsl:text>','itemsPerPage':'</xsl:text><xsl:value-of select="*[local-name()='itemsPerPage']"/><xsl:text>',</xsl:text><xsl:for-each select="tokenize(substring-after(atom:link[@rel='next']/@href, '?'), '&amp;')">'<xsl:value-of select="translate(lower-case(substring-before(.,'=')), '-', '')"/>':'<xsl:value-of select="substring-after(.,'=')"/>',</xsl:for-each>'nextUrl':'<xsl:value-of select="atom:link[@rel='next']/@href"/>',<xsl:text>'selfUrl':'</xsl:text><xsl:value-of select="concat($base-uri, atom:link[@rel='self']/@href)"/>'<xsl:text>};initPager(pagerContext);var highlighter={words:'</xsl:text><xsl:value-of select="replace($parameters/param[@name='q']/@value, '%20|\s|\+', ',')"/><xsl:text>'};if(typeof(Storage)!=="undefined"){sessionStorage.highlighter=JSON.stringify(highlighter);}highlight("wet-boew-texthighlight",highlighter);});
<!-- $(document).ready(function () {
var recentItemsContext = {};
initRecentItems(recentItemsContext);
var totalResults = '</xsl:text><xsl:value-of select="*[local-name()='totalResults']"/><xsl:text>';
if(totalResults &amp;&amp; totalResults &gt; 0) {
var qrcodeContext = {
'uri':'</xsl:text><xsl:value-of select="concat($base-uri, atom:link[@rel='alternate'][@type='text/html']/@href)"/><xsl:text>&amp;pk_campaign=qrcode',
};
initQRCode(qrcodeContext);
};
var pagerContext = {
'uriSelf':'</xsl:text><xsl:value-of select="$uriSelf"/><xsl:text>',
'totalResults':'</xsl:text><xsl:value-of select="*[local-name()='totalResults']"/><xsl:text>',
'currentIndex':'</xsl:text><xsl:value-of select="*[local-name()='startIndex']"/><xsl:text>',
'itemsPerPage':'</xsl:text><xsl:value-of select="*[local-name()='itemsPerPage']"/><xsl:text>',</xsl:text><xsl:for-each select="tokenize(substring-after(atom:link[@rel='next']/@href, '?'), '&amp;')">
'<xsl:value-of select="translate(lower-case(substring-before(.,'=')), '-', '')"/>':'<xsl:value-of select="substring-after(.,'=')"/>',</xsl:for-each>
'nextUrl':'<xsl:value-of select="atom:link[@rel='next']/@href"/>',<xsl:text>
'selfUrl':'</xsl:text><xsl:value-of select="concat($base-uri, atom:link[@rel='self']/@href)"/>'<xsl:text>
};
initPager(pagerContext);
var highlighter = {words:'</xsl:text><xsl:value-of select="replace($parameters/param[@name='q']/@value, '%20|\s|\+', ',')"/><xsl:text>'};
if(typeof(Storage)!=="undefined") { sessionStorage.highlighter = JSON.stringify(highlighter); }
highlight("wet-boew-texthighlight", highlighter);
}); -->
/* ]]&gt; */
</xsl:text></script>
</body>
</html>
</xsl:template>

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

Functions

***********************************************************************************************************************************************
-->
<!--
Uppercase
-->
<xsl:template name="upper-case">
<xsl:param name="words"/>
<xsl:value-of select="string-join((for $s in tokenize($words,' '), $fl in substring($s,1,1), $tail in substring($s,2) return concat(upper-case($fl), $tail)), ' ')"/>
</xsl:template>
<!--
File size
-->
<xsl:template name="file-size">
<xsl:param name="fsize"/>
<xsl:choose>
<xsl:when test="$fsize &gt; 0">
<xsl:choose>
<xsl:when test="$fsize &gt;= 1">
<xsl:value-of select="format-number($fsize, '0.0#')"/> MB
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number($fsize * 1024, '0.0#')"/> KB
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>N/A</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!--
Version message
-->
<xsl:template name="version-message">
<xsl:param name="lang-ISO639-1"/>
<xsl:param name="domain"/>
<xsl:if test="$domain='dev'">
<div class="module-note margin-bottom-medium margin-top-medium">
<xsl:if test="$lang-ISO639-1='en'">
<h3><span class="color-dark">Note:</span> This is the development version of the GeoGratis API.</h3>
<p>Do not use except for testing and debugging purposes. The production version can be found <a href="http://geogratis.gc.ca/api/en" title="Link to production version of GeoGratis API">here</a>.</p>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<h3><span class="color-dark">Note :</span> Ceci est la version de développement de l’API GeoGratis.</h3>
<p>N'utilisez celle-ci qu'à des fins de test ou de débogage. La version de production est disponible <a href="http://geogratis.gc.ca/api/fr" title="Lien vers la version de production de l’API GeoGratis">ici</a>.</p>
</xsl:if>
</div>
</xsl:if>
<xsl:if test="$domain='beta'">
<div class="module-note margin-bottom-medium margin-top-medium">
<xsl:if test="$lang-ISO639-1='en'">
<h3><span class="color-dark">Note:</span> This is the beta version of the GeoGratis API.</h3>
<p>The production version can be found <a href="http://geogratis.gc.ca/api/en" title="Link to production version of GeoGratis API">here</a>.</p>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<h3><span class="color-dark">Note :</span> Ceci est la version beta de l’API GeoGratis.</h3>
<p>La version de production est disponible <a href="http://geogratis.gc.ca/api/fr" title="Lien vers la version de production de l’API GeoGratis">ici</a>.</p>
</xsl:if>
</div>
</xsl:if>
</xsl:template>

<!--
URI cleaner
-->
<xsl:template name="clean-uri">
<xsl:param name="uri"/>
<xsl:value-of select="replace(replace($uri, '\.xml\?alt=html|\.xml', '.html'), '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', '' )"/>
</xsl:template>
<!--
Build share links
-->
<xsl:template name="share">
<xsl:param name="lang-ISO639-1"/>
<xsl:param name="url"/>
<!-- Share widget project begins / Début du projet du gadget partage
<div id="sharepartagez"></div>-->
<!-- Share widget project ends / Fin du projet du gadget partage -->
<xsl:variable name="mail-subject">
<xsl:if test="$lang-ISO639-1='en'">Interesting%20page</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Page%20int%E9ressante</xsl:if>
</xsl:variable>
<xsl:variable name="mail-body">
<xsl:if test="$lang-ISO639-1='en'">I%20thought%20you%20might%20find%20this%20page%20interesting:</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">J%27esp%E8re%20que%20cette%20page%20vous%20int%E9ressera%20:</xsl:if>
</xsl:variable>
<xsl:variable name="title1">
<xsl:if test="$lang-ISO639-1='en'">Send to </xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Envoyez à </xsl:if>
</xsl:variable>
<xsl:variable name="title2">
<xsl:if test="$lang-ISO639-1='en'"> (Opens in a new window)</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'"> (Ouvre dans une nouvelle fenêtre)</xsl:if>
</xsl:variable>
<xsl:variable name="id">
<xsl:choose>
<xsl:when test="//atom:feed"><xsl:value-of select="normalize-space(atom:title)"/></xsl:when>
<xsl:otherwise><xsl:value-of select="*[local-name()='entryId']"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<h2 class="wb-invisible">Social</h2>
<p class="wb-invisible">
<xsl:if test="$lang-ISO639-1='en'">To share this page, please select the social network of your choice.</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Pour partager cette page, veuillez sélectionner le réseau sociale de votre choix.</xsl:if>
</p>
<ul class="menu-horizontal indent-none">
<li><a href="mailto:?subject={$mail-subject}&amp;body={$mail-body}%20{encode-for-uri($url)}" class="button-share email" rel="nofollow" title="{$title1}Email{$title2}" onclick="javascript:piwikTracker.trackPageView('social/email');"><span title="{$title1}Email{$title2}">Email</span></a></li>
<li><a href="http://twitter.com/home?status={encode-for-uri(normalize-space(atom:title))}%20{$url}" class="button-share twitter" rel="nofollow" title="{$title1}Twitter{$title2}" target="_blank" onclick="javascript:piwikTracker.trackPageView('social/twitter');"><span title="{$title1}Twitter{$title2}">Twitter</span></a></li>
<li><a href="http://www.facebook.com/sharer.php?u={$url}&amp;t={encode-for-uri(normalize-space(atom:title))}" class="button-share facebook" rel="nofollow" title="{$title1}Facebook{$title2}" target="_blank" onclick="javascript:piwikTracker.trackPageView('social/facebook');"><span title="{$title1}Facebook{$title2}">Facebook</span></a></li>
<li><a href="https://plus.google.com/share?url={$url}" class="button-share google-plus" rel="nofollow" title="{$title1}Google Plus{$title2}" target="_blank" onclick="javascript:piwikTracker.trackPageView('social/googleplus');"><span title="{$title1}Google Plus{$title2}">Google Plus</span></a></li>
<li><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url={$url}&amp;title={encode-for-uri(normalize-space(atom:title))}&amp;ro=false&amp;summary={encode-for-uri(normalize-space(atom:title))}" class="button-share linkedin" rel="nofollow" title="{$title1}LinkedIn{$title2}" target="_blank" onclick="javascript:piwikTracker.trackPageView('social/linkedin');"><span title="{$title1}LinkedIn{$title2}">LinkedIn</span></a></li>
<li><a href="http://www.stumbleupon.com/submit?url={$url}&amp;title={encode-for-uri(normalize-space(atom:title))}" class="button-share stumbleupon" rel="nofollow" title="{$title1}SumbleUpon{$title2}" target="_blank" onclick="javascript:piwikTracker.trackPageView('social/stumbleupon');"><span title="{$title1}StumbleUpon{$title2}">StumbleUpon</span></a></li>
<li><a href="http://delicious.com/post?url={$url}&amp;title={encode-for-uri(normalize-space(atom:title))}" class="button-share delicious" rel="nofollow" title="{$title1}del.icio.us{$title2}" target="_blank" onclick="javascript:piwikTracker.trackPageView('social/delicious');"><span title="{$title1}del.icio.us{$title2}">del.icio.us</span></a></li>
</ul>
<div class="clear"/>
</xsl:template>

<!--
Build list of alternate representations
-->
<xsl:template name="alternate-representations">
<xsl:variable name="base-uri" select="/node()/@xml:base"/>
<ul class="list-bullet-none indent-medium">
<xsl:for-each select="atom:link[@rel='alternate'][@type!='text/html']">
<xsl:if test="@type='application/atom+xml'">
<li class="margin-bottom-small">
<a rel="nofollow" href="{concat($base-uri, replace(@href, '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', ''))}" onClick="javascript:piwikTracker.trackPageView('alternate/atom')">ATOM</a>
</li>
</xsl:if>
<xsl:if test="@type='application/rss+xml'">
<li class="margin-bottom-small">
<a rel="nofollow" href="{concat($base-uri, replace(@href, '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', ''))}" onClick="javascript:piwikTracker.trackPageView('alternate/rss')">RSS</a>
</li>
</xsl:if>
<xsl:if test="@type='text/phtml'">
<li class="margin-bottom-small">
<a rel="nofollow" href="{concat($base-uri, replace(@href, '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', ''))}" onClick="javascript:piwikTracker.trackPageView('alternate/phtml')">HTML Fragment</a>
</li>
</xsl:if>
<xsl:if test="@type='application/json'">
<li class="margin-bottom-small">
<a rel="nofollow" href="{concat($base-uri, replace(@href, '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', ''))}" onClick="javascript:piwikTracker.trackPageView('alternate/json')">JSON</a>
</li>
</xsl:if>
<xsl:if test="parent::atom:entry and @type='application/vnd.nrcan.nap+xml'">
<li class="margin-bottom-small">
<a rel="nofollow" href="{concat($base-uri, replace(@href, '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', ''))}" onClick="javascript:piwikTracker.trackPageView('alternate/nap')">ISO 19115</a>
</li>
</xsl:if>
<xsl:if test="@type='application/vnd.google-earth.kml+xml'">
<li class="margin-bottom-small">
<a href="{concat($base-uri, replace(@href, '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', ''))}" onClick="javascript:piwikTracker.trackPageView('alternate/kml')">KML</a>
</li>
</xsl:if>
<xsl:if test="@type='application/gcod+xml'">
<li class="margin-bottom-small">
<a rel="nofollow" href="{concat($base-uri, replace(@href, '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', ''))}" onClick="javascript:piwikTracker.trackPageView('alternate/gcod')">GCOD</a>
</li>
</xsl:if>
<xsl:if test="@type='text/csv'">
<li class="margin-bottom-small">
<a rel="nofollow" href="{concat($base-uri, replace(@href, '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', ''))}" onClick="javascript:piwikTracker.trackPageView('alternate/csv')">CSV</a>
</li>
</xsl:if>
<xsl:if test="@type='text/html; profile=&quot;http://nap.geogratis.gc.ca/&quot;'">
<li class="margin-bottom-small">
<a href="{concat($base-uri, replace(@href, '&amp;locale=en_CA|locale=en_CA&amp;|&amp;locale=fr_CA|locale=fr_CA&amp;', ''))}" onClick="javascript:piwikTracker.trackPageView('alternate/naphtml')">ISO 19115 HTML</a>
</li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:template>

<!--
Build GC footer
-->
<xsl:template name="footer">
<xsl:param name="lang-ISO639-1"/>
<!-- Footer begins / Début du pied de page -->
<div id="wb-foot">
<div id="wb-foot-in">
<footer>
<h2 id="wb-nav">
<xsl:if test="$lang-ISO639-1='en'">Footer</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Pied de page</xsl:if>
</h2>
<!-- GC Web Usability theme begins / Début du thème de la facilité d'emploi GC -->
<!-- Site footer begins / Début du pied de page du site -->
<nav role="navigation">
<div id="gcwu-sft">
<xsl:if test="$lang-ISO639-1='en'">
<h3>Site footer</h3>
<div id="gcwu-sft-in">
<div id="gcwu-tctr">
<ul>
<li class="gcwu-tc">
<a href="http://www.nrcan-rncan.gc.ca/com/notiavis-eng.php" rel="license">Terms and conditions</a>
</li>
<li class="gcwu-tr">
<a href="http://www.nrcan.gc.ca/proactive-disclosure/874">Transparency</a>
</li>
</ul>
</div>
<div class="clear"/>
<section>
<div class="span-2">
<h4 class="gcwu-col-head"><a href="http://www.nrcan.gc.ca/department/535">About us</a></h4>
<ul>
<li><a href="http://www.nrcan.gc.ca/department/535">The Department</a></li>
<li><a href="http://www.nrcan.gc.ca/media-room/minister/1955">Our Minister</a></li>
<li><a href="http://www.nrcan.gc.ca/deputy-minister/34">Our Deputy Minister</a></li>
</ul>
</div>
</section>
<section>
<div class="span-2">
<h4 class="gcwu-col-head"><a href="http://www.nrcan.gc.ca/media-room/home/1784">News</a></h4>
<ul>
<li><a href="http://www.nrcan.gc.ca/media-room/news-releases/2128">News releases</a></li>
<li><a href="http://www.nrcan.gc.ca/media-room/advisories/1789">Media advisories</a></li>
<li><a href="http://www.nrcan.gc.ca/media-room/news-releases/2012/3742">Backgrounders</a></li>
<li><a href="http://www.nrcan.gc.ca/photo-gallery/home/1244">Photo Gallery</a></li>
<li><a href="http://www.nrcan.gc.ca/media-room/speeches/1654">Speeches</a></li>
</ul>
</div>
</section>
<section>
<div class="span-2">
<h4 class="gcwu-col-head"><a href="http://contact-contactez.nrcan-rncan.gc.ca/index.cfm?lang=eng&amp;sid=7">Contact us</a></h4>
<ul>
<li><a href="http://contact-contactez.nrcan-rncan.gc.ca/index.cfm?lang=eng&amp;sid=7">Inquiries and Frequently Asked Questions</a></li>
<li><a href="http://www2.nrcan.gc.ca/dpspub/index.cfm?fuseaction=phonedir.showForm&amp;userLang=E">Find an Employee</a></li>
<li><a href="http://www.nrcan.gc.ca/public-consultations/881">Public Consultations</a></li>
<li>Telephone Number:<br/><span itemprop="telephone">+01-819-564-4857</span> / <span itemprop="telephone">1-800-661-2638</span> (Canada and USA)</li>
</ul>
</div>
</section>
<section>
<div class="span-2">
<h4 class="gcwu-col-head">Stay connected</h4>
<ul>
<li><a rel="external" href="http://www.youtube.com/user/NaturalResourcesCa">YouTube</a></li>
<li><a href="http://www.nrcan.gc.ca/media-room/RSS-feeds/1580">RSS Feeds</a></li>
</ul>
</div>
</section>
</div>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<h3>Pied de page du site</h3>
<div id="gcwu-sft-in">
<div id="gcwu-tctr">
<ul>
<li class="gcwu-tc">
<a href="http://www.nrcan-rncan.gc.ca/com/notiavis-fra.php" rel="license">Avis</a>
</li>
<li class="gcwu-tr">
<a href="http://www.rncan.gc.ca/divulgation-proactive/507">Transparence</a>
</li>
</ul>
</div>
<div class="clear"/>
<section>
<div class="span-2">
<h4 class="gcwu-col-head"><a href="http://www.rncan.gc.ca/ministere/180">À propos de nous</a></h4>
<ul>
<li><a href="http://www.rncan.gc.ca/ministere/180">Le ministère</a></li>
<li><a href="http://www.rncan.gc.ca/salle-medias/ministre/1535">Notre ministre</a></li>
<li><a href="http://www.rncan.gc.ca/sous-ministre/557">Notre sous-ministre</a></li>
</ul>
</div>
</section>
<section>
<div class="span-2">
<h4 class="gcwu-col-head"><a href="http://www.rncan.gc.ca/salle-medias/accueil/1352">Nouvelles</a></h4>
<ul>
<li><a href="http://www.rncan.gc.ca/salle-medias/communiques/1706">Communiqués</a></li>
<li><a href="http://www.rncan.gc.ca/salle-medias/avis-medias/1359">Avis aux médias</a></li>
<li><a href="http://www.rncan.gc.ca/salle-medias/communiques/2012/3743">Documents d'information</a></li>
<li><a href="http://www.rncan.gc.ca/galerie-photos/accueil/1867">Galerie de photos</a></li>
<li><a href="http://www.rncan.gc.ca/salle-medias/discours/2011/1227">Discours</a></li>
</ul>
</div>
</section>
<section>
<div class="span-2">
<h4 class="gcwu-col-head"><a href="http://contact-contactez.nrcan-rncan.gc.ca/index.cfm?lang=fra&amp;sid=7">Contactez-nous</a></h4>
<ul>
<li><a href="http://contact-contactez.nrcan-rncan.gc.ca/index.cfm?lang=fra&amp;sid=5">Demandes d'information et Foire aux questions</a></li>
<li><a href="http://www2.nrcan.gc.ca/dpspub/index.cfm?USERLANG=F&amp;FUSEACTION=phonedir.showForm">Répertoire des employés</a></li>
<li><a href="http://www.rncan.gc.ca/consultations-publiques/512">Consultations publiques</a></li>
<li>Numéro de téléphone :<br/><span itemprop="telephone">+01-819-564-4857</span> / <span itemprop="telephone">1-800-661-2638</span> (Canada et États-Unis)</li>
</ul>
</div>
</section>
<section>
<div class="span-2">
<h4 class="gcwu-col-head">Restez branchés</h4>
<ul>
<li><a rel="external" href="http://www.youtube.com/user/Ressourcesnaturelles">YouTube</a></li>
<li><a href="http://www.rncan.gc.ca/salle-medias/flux-RSS/2208">Flux RSS</a></li>
</ul>
</div>
</section>
</div>
</xsl:if>
</div>
</nav>
<!-- Site footer ends / Fin du pied de page du site -->

<!-- GC footer begins / Début du pied de page GC -->
<nav role="navigation">
<div id="gcwu-gcft">
<h3>
<xsl:if test="$lang-ISO639-1='en'">Government of Canada footer</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Pied de page du gouvernement du Canada</xsl:if>
</h3>
<div id="gcwu-gcft-in">
<div id="gcwu-gcft-fip">
<ul>
<xsl:if test="$lang-ISO639-1='en'">
<li>
<a rel="external" href="http://healthycanadians.gc.ca/index-eng.php"><span>Health</span><br/>healthycanadians.gc.ca</a>
</li>
<li>
<a rel="external" href="http://www.voyage.gc.ca/index-eng.asp"><span>Travel</span><br/>travel.gc.ca</a>
</li>
<li>
<a rel="external" href="http://www.servicecanada.gc.ca/eng/home.shtml"><span>Service Canada</span><br/>servicecanada.gc.ca</a>
</li>
<li>
<a rel="external" href="http://www.jobbank.gc.ca/intro-eng.aspx"><span>Jobs</span><br/>jobbank.gc.ca</a>
</li>
<li>
<a rel="external" href="http://actionplan.gc.ca/en"><span>Economy</span><br/>actionplan.gc.ca</a>
</li>
<li id="gcwu-gcft-ca">
<div>
<a rel="external" href="http://www.canada.gc.ca/home.html">Canada.gc.ca</a>
</div>
</li>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<li>
<a rel="external" href="http://canadiensensante.gc.ca/index-fra.php"><span>Santé</span><br/>canadiensensante.gc.ca</a>
</li>
<li>
<a rel="external" href="http://voyage.gc.ca/index-fra.asp"><span>Voyage</span><br/>voyage.gc.ca</a>
</li>
<li>
<a rel="external" href="http://www.servicecanada.gc.ca/fra/accueil.shtml"><span>Service Canada</span><br/>servicecanada.gc.ca</a>
</li>
<li>
<a rel="external" href="http://www.guichetemplois.gc.ca/Intro-fra.aspx"><span>Emplois</span><br/>guichetemplois.gc.ca</a>
</li>
<li>
<a rel="external" href="http://www.plandaction.gc.ca"><span>Économie</span><br/>plandaction.gc.ca</a>
</li>
<li id="gcwu-gcft-ca">
<div>
<a rel="external" href="http://www.canada.gc.ca/accueil.html">Canada.gc.ca</a>
</div>
</li>
</xsl:if>
</ul>
</div>
</div>
</div>
</nav>
<!-- GC footer ends / Fin du pied de page GC -->
<!-- GC Web Usability theme ends / Fin du thème de la facilité d'emploi GC -->
</footer>
</div>
</div>
<!-- Footer ends / Fin du pied de page -->
</xsl:template>

<!--
Tokenize a string
-->
<xsl:template name="output-tokens">
<xsl:param name="list"/>
<xsl:param name="delimeter"/>
<xsl:variable name="newlist" select="concat(normalize-space($list), ' ')"/>
<xsl:variable name="first" select="substring-before($newlist, $delimeter)"/>
<xsl:variable name="remaining" select="substring-after($newlist, $delimeter)"/>
<xsl:value-of select="$first"/>, <xsl:if test="$remaining">
<xsl:call-template name="output-tokens">
<xsl:with-param name="list" select="$remaining"/>
</xsl:call-template>
</xsl:if>
</xsl:template>

<!--
Clean up bbox parameters
-->
<xsl:template name="clean-bbox">
<xsl:param name="list"/>
<xsl:variable name="newlist" select="concat(normalize-space($list), ',')"/>
<xsl:variable name="first" select="number(substring-before($newlist, ','))"/>
<xsl:variable name="remaining" select="substring-after($list, ',')"/>

<xsl:value-of select="format-number($first, '0.######')"/>

<xsl:if test="$remaining">
<xsl:text>, </xsl:text>
<xsl:call-template name="clean-bbox">
<xsl:with-param name="list" select="$remaining"/>
</xsl:call-template>
</xsl:if>
</xsl:template>

<!--
Escape a string
-->
<xsl:template name="escape">
<xsl:param name="text"/>
<xsl:variable name="apos" select="&quot;\'&quot;"/>
<!-- \' -->
<xsl:choose>
<xsl:when test="contains($text, $apos)">
<xsl:value-of select="substring-before($text, $apos)" disable-output-escaping="yes"/>
<xsl:text>'</xsl:text>
<xsl:call-template name="escape">
<xsl:with-param name="text" select="substring-after($text, $apos)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text" disable-output-escaping="yes"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!--
Generate GC Header
-->
<xsl:template name="header">
<xsl:param name="lang-ISO639-1"/>
<xsl:param name="domain"/>
<xsl:variable name="base-uri" select="/node()/@xml:base"/>
<!-- Skip header begins / Début du saut de l'en-tête -->
<div id="wb-skip">
<ul id="wb-tphp">
<li id="wb-skip1"><a href="#wb-cont">
<xsl:if test="$lang-ISO639-1='en'">Skip to main content</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Passer au contenu principal</xsl:if>
</a>
</li>
<li id="wb-skip2"><a href="#wb-nav">
<xsl:if test="$lang-ISO639-1='en'">Skip to footer</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Passer à la navigation principale</xsl:if>
</a>
</li>
</ul>
</div>
<!-- Skip header ends / Fin du saut de l'en-tête -->
<!-- Header begins / Début de l'en-tête -->
<div id="wb-head">
<div id="wb-head-in">
<header>
<!-- GC Web Usability theme begins / Début du thème de la facilité d'emploi GC -->
<!-- GC navigation bar begins / Début de la barre de navigation GC -->
<nav role="navigation">
<div id="gcwu-gcnb">
<h2>
<xsl:if test="$lang-ISO639-1='en'">Government of Canada navigation bar</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Barre de navigation de la gouvernement de Canada</xsl:if>
</h2>
<div id="gcwu-gcnb-in">
<div id="gcwu-gcnb-fip">
<div id="gcwu-sig">
<div id="gcwu-sig-in">
<xsl:if test="$lang-ISO639-1='en'">
<div id="gcwu-sig-eng" title="Government of Canada">
<img src="/build-3.0.2/theme-gcwu-fegc/images/sig-eng.gif" width="214" height="20" alt="Government of Canada" title="Government of Canada"/>
</div>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<div id="gcwu-sig-fra" title="Gouvernement du Canada">
<img src="/build-3.0.2/theme-gcwu-fegc/images/sig-fra.gif" width="214" height="20" alt="Gouvernement du Canada" title="Gouvernement du Canada"/>
</div>
</xsl:if>
</div>
</div>
<xsl:if test="$lang-ISO639-1='en'">
<ul>
<li id="gcwu-gcnb1">
<a rel="external" href="http://www.canada.gc.ca/home.html">Canada.gc.ca</a>
</li>
<li id="gcwu-gcnb2">
<a rel="external" href="http://www.servicecanada.gc.ca/eng/home.shtml">Services</a>
</li>
<li id="gcwu-gcnb3">
<a rel="external" href="http://www.canada.gc.ca/aboutgov-ausujetgouv/depts/menu-eng.html">Departments</a>
</li>
<li id="gcwu-gcnb-lang">
<a lang="fr">
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri" select="concat(base-uri(), replace(atom:link[@rel='self']/@href, '/en/', '/fr/'))"/>
</xsl:call-template>
</xsl:attribute>
<xsl:attribute name="title">Fran&#231;ais - Version fran&#231;ais de cette page</xsl:attribute>
Fran<xsl:text disable-output-escaping="yes"><![CDATA[&ccedil;]]></xsl:text>ais</a>
</li>
</ul>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<ul>
<li id="gcwu-gcnb1">
<a rel="external" href="http://www.canada.gc.ca/accueil.html">Canada.gc.ca</a>
</li>
<li id="gcwu-gcnb2">
<a rel="external" href="http://www.servicecanada.gc.ca/fra/accueil.shtml">Services</a>
</li>
<li id="gcwu-gcnb3">
<a rel="external" href="http://www.canada.gc.ca/aboutgov-ausujetgouv/depts/menu-fra.html">Ministères</a>
</li>
<li id="gcwu-gcnb-lang">
<a lang="en" title="English - English version of the Web page"><xsl:variable name="link-to-self"><xsl:value-of select="atom:link[@rel='self']/@href"/></xsl:variable>
<xsl:attribute name="href">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri" select="concat(base-uri(), replace(atom:link[@rel='self']/@href, '/fr/', '/en/'))"/>
</xsl:call-template>
</xsl:attribute>
English</a>
</li>
</ul>
</xsl:if>
</div>
</div>
</div>
</nav>
<!-- GC navigation bar ends / Fin de la barre de navigation GC -->
<!-- Banner begins / Début de la bannière -->
<div id="gcwu-bnr" role="banner">
<div id="gcwu-bnr-in">
<div id="gcwu-wmms">
<div id="gcwu-wmms-in">
<xsl:if test="$lang-ISO639-1='en'">
<div id="gcwu-wmms-fip" title="Symbol of the Government of Canada">
<img src="/build-3.0.2/theme-gcwu-fegc/images/wmms.gif" width="126" height="20" alt="Symbol of the Government of Canada" title="Symbol of the Government of Canada"/>
</div>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<div id="gcwu-wmms-fip" title="Symbole du gouvernement du Canada">
<img src="/build-3.0.2/theme-gcwu-fegc/images/wmms.gif" width="126" height="20" alt="Symbole du gouvernement du Canada" title="Symbole du gouvernement du Canada"/>
</div>
</xsl:if>
</div>
</div>

<!-- Site title begins / Début du titre du site -->
<div id="gcwu-title">
<p id="gcwu-title-in">
<a href="{$base-uri}">
<xsl:if test="$lang-ISO639-1='en'">GeoGratis (API)</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">GeoGratis (API)</xsl:if>
</a>
<span class="version align-top font-xsmall">
<xsl:choose>
<xsl:when test="$domain='dev'"> vDev</xsl:when>
<xsl:when test="$domain='beta'"> vBeta</xsl:when>
<xsl:otherwise> v1.3</xsl:otherwise>
</xsl:choose>
</span>
</p>
</div>
<section role="search">
<div id="gcwu-srchbx">
<h2><xsl:if test="$lang-ISO639-1='en'">Search</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Recherche</xsl:if></h2>
<form method="get" action="#">
<xsl:variable name="link-to-self">
<xsl:call-template name="clean-uri">
<xsl:with-param name="uri">
<xsl:value-of select="atom:link[@rel='self']/@href"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:attribute name="action">
<xsl:value-of select="$base-uri"/>
<xsl:choose>
<xsl:when test="not(//atom:feed)">
<xsl:value-of select="substring-before($link-to-self, *[local-name()='entryId'])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$link-to-self"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<div id="gcwu-srchbx-in">
<label for="gcwu-srch"><xsl:if test="$lang-ISO639-1='en'">Search website</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Recherchez le site Web</xsl:if></label>
<input id="gcwu-srch" name="q" type="search" value="" size="27" maxlength="150" /><xsl:text> </xsl:text>
<input id="gcwu-srch-submit" name="gcwu-srch-submit" type="submit" data-icon="search">
<xsl:attribute name="value"><xsl:if test="$lang-ISO639-1='en'">Search</xsl:if><xsl:if test="$lang-ISO639-1='fr'">Recherche</xsl:if></xsl:attribute>
</input>
</div>
</form>
</div>
</section>
</div>
</div>
<!-- Banner ends / Fin de la bannière -->
<nav role="navigation">
<div id="gcwu-psnb">
<h2>
<xsl:if test="$lang-ISO639-1='en'">Site navigation bar</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Barre de navigation du site</xsl:if>
</h2>
<div id="gcwu-psnb-in">
<div class="wet-boew-menubar mb-mega">
<div>
<ul class="mb-menu">
<li><section><h3><a href="#">GeoGratis API</a></h3><div class="mb-sm">
<div class="span-2">
<ul>
<li>
<xsl:choose>
<xsl:when test="$domain='beta'">
<xsl:if test="$lang-ISO639-1='en'">
<a href="{concat(base-uri(), '/api/beta/en/')}">Documentation</a>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<a href="{concat(base-uri(), '/api/beta/fr/')}">Documentation</a>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="$lang-ISO639-1='en'">
<a href="{concat(base-uri(), '/api/en/')}">Documentation</a>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<a href="{concat(base-uri(), '/api/fr/')}">Documentation</a>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</li>
<!--<li>
<xsl:if test="$lang-ISO639-1='en'">
<a href="#">Terms and conditions</a>
</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">
<a href="#">Conditions régissant l'utilisation</a>
</xsl:if>
</li>-->
</ul>
</div>
<div class="clear"></div>
<div class="mb-main-link">
<xsl:if test="$lang-ISO639-1='en'"><a href="http://geogratis.gc.ca">GeoGratis - Main page</a></xsl:if>
<xsl:if test="$lang-ISO639-1='fr'"><a href="http://geogratis.gc.ca">GeoGratis - Page principale</a></xsl:if>
</div>
</div></section></li>
</ul>
</div>
</div>
</div>
</div>
<!-- Primary site navigation bar ends / Fin de la barre de navigation primaire du site -->

<!-- Breadcrumbs begins / Début du fil d'Ariane -->
<div id="gcwu-bc">
<h2>
<xsl:if test="$lang-ISO639-1='en'">Breadcrumbs</xsl:if>
<xsl:if test="$lang-ISO639-1='fr'">Fil d'Ariane</xsl:if>
</h2>
<div id="gcwu-bc-in">
<ol itemprop="breadcrumb">
<xsl:variable name="t" select="tokenize(atom:link[@rel='self']/@href, '/|\?')"/>
<xsl:choose>
<xsl:when test="$t[3]='en' or $t[3]='fr'"> <!-- no api version -->
<li><a href="{concat(base-uri(), '/', $t[2], '/', $t[3], '/', $t[4])}"><xsl:value-of select="$t[4]"/></a></li>
<li><a href="{concat(base-uri(), '/', $t[2], '/', $t[3], '/', $t[4], '/', $t[5])}"><xsl:value-of select="$t[5]"/></a></li>
</xsl:when>
<xsl:otherwise>
<li><a href="{concat(base-uri(), '/', $t[2], '/', $t[3], '/', $t[4], '/', $t[5])}"><xsl:value-of select="$t[5]"/></a></li>
<li><a href="{concat(base-uri(), '/', $t[2], '/', $t[3], '/', $t[4], '/', $t[5], '/', $t[6])}"><xsl:value-of select="$t[6]"/></a></li>
</xsl:otherwise>
</xsl:choose>
<li><xsl:value-of select="atom:title"/></li>
</ol>
</div>
</div>
<!-- Breadcrumbs end / Fin du fil d'Ariane -->
</nav>
<!-- GC Web Usability theme ends / Fin du thème de la facilité d'emploi GC -->
</header>
</div>
</div>
<!-- Header ends / Fin de l'en-tête -->
</xsl:template>

<!-- Create links out of URI's in a text string -->
<xsl:template name="hyperlink">
<xsl:param name="string" select="string(.)"/>
<xsl:analyze-string select="$string" regex="http://[^ |\)]+">
<xsl:matching-substring>
<a href="{.}">
<xsl:value-of select="."/>
</a>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select="."/>
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:template>

<!-- Escape spaces in category link -->
<xsl:template name="escape-spaces">
<xsl:param name="original"/>
<xsl:variable name="space" select="&quot; &quot;"/>
<xsl:variable name="replacement" select="&quot;%2520&quot;"/>
<xsl:choose>
<xsl:when test="contains($original, $space)">
<xsl:value-of select="substring-before($original, $space)"/>
<xsl:copy-of select="$replacement"/>
<xsl:call-template name="escape-spaces">
<xsl:with-param name="original" select="substring-after($original, $space)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$original"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="piwik">
<xsl:param name="domain"/>
<xsl:variable name="siteId">
<xsl:choose>
<xsl:when test="$domain='dev'">1</xsl:when>
<xsl:when test="$domain='beta'">3</xsl:when>
<xsl:otherwise>2</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL="https:"==document.location.protocol?"https://geogratis.gc.ca/track/":"http://geogratis.gc.ca/track/";document.write(unescape("%3Cscript src='"+pkBaseURL+"piwik.js' type='text/javascript'%3E%3C/script%3E"))
</script>
<script type="text/javascript">
try{var piwikTracker=Piwik.getTracker(pkBaseURL+"piwik.php", <xsl:value-of select="$siteId"/>);piwikTracker.trackPageView();piwikTracker.enableLinkTracking()}catch(err){}
</script>
<noscript>
<p><img src="http://geogratis.gc.ca/track/piwik.php?idsite={$siteId}" style="border:0" alt=""/></p>
</noscript>
<!-- End Piwik Tracking Code -->
</xsl:template>

</xsl:stylesheet>
(1-1/2)