Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2

    
3
<!--
4
Description: presents the list of events in a GeoRSS
5
Author:      adair
6
Licence:     LGPL as specified in http://www.gnu.org/copyleft/lesser.html .
7

    
8
$Id: GeoRSSListing.xsl 3926 2008-03-20 14:13:35Z steven $
9
$Name:  $
10
-->
11

    
12
<xsl:stylesheet version="1.0" 
13
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
14
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
15
  xmlns:rss="http://purl.org/rss/1.0/" 
16
  xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" 
17
  xmlns:dc="http://purl.org/dc/elements/1.1/" 
18
  xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" 
19
  xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
20

    
21
  <xsl:output method="xml" omit-xml-declaration="yes" encoding="utf-8" indent="yes"/>
22

    
23
  <!-- The coordinates of the DHTML Layer on the HTML page -->
24
  <xsl:param name="modelId"/>
25
  <xsl:param name="targetModelId"/>
26
  <xsl:param name="widgetId"/>
27
  <xsl:param name="hiddenItems"/>
28
  
29
  <!-- template rule matching source root element -->
30
  <xsl:template match="/rdf:RDF ">
31
    <table>
32
      <xsl:apply-templates select="rss:item"/>
33
    </table>
34
  </xsl:template>
35

    
36
  <xsl:template match="rss:item">
37
    <xsl:variable name="fid"><xsl:value-of select="@id"/></xsl:variable>
38
    <xsl:variable name="x"><xsl:value-of select="geo:long"/></xsl:variable>
39
    <xsl:variable name="y"><xsl:value-of select="geo:lat"/></xsl:variable>
40
    <xsl:variable name="link"><xsl:value-of select="rss:link"/></xsl:variable>
41
    <xsl:variable name="icon">../../lib/skin/default<xsl:value-of select="geo:icon"/></xsl:variable>
42
    <tr>
43
      <td>
44
        <input type="checkbox" checked="true" onclick="this.checked?config.objects.{$modelId}.setParam('showFeature','{$fid}'):config.objects.{$modelId}.setParam('hideFeature','{$fid}')" />
45
      </td>
46
      <td onmouseover="config.objects.{$modelId}.setParam('highlightFeature','{$fid}')" onmouseout="config.objects.{$modelId}.setParam('dehighlightFeature','{$fid}')">
47
        <!-- img src="{$icon}" / -->
48
        <a href="{$link}"><xsl:value-of select="rss:title"/></a>
49
        <xsl:copy-of select="rss:description"/>
50
      </td>
51
    </tr>
52
  </xsl:template>
53

    
54
</xsl:stylesheet>
(3-3/6)