1
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
|
3
|
<!--
|
4
|
Description: presents the list of FeatureTypes from a WFS capabilities doc.
|
5
|
Links provided to filter and load the selected FeatureType.
|
6
|
Author: adair
|
7
|
Licence: LGPL as specified in http://www.gnu.org/copyleft/lesser.html .
|
8
|
|
9
|
$Id$
|
10
|
$Name$
|
11
|
-->
|
12
|
|
13
|
<xsl:stylesheet version="1.0"
|
14
|
xmlns:wfs="http://www.opengis.net/wfs"
|
15
|
xmlns:owscat="http://www.ec.gc.ca/owscat"
|
16
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17
|
xmlns:ogc="http://www.opengis.net/ogc"
|
18
|
xmlns:gml="http://www.opengis.net/gml"
|
19
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
20
|
|
21
|
<xsl:output method="xml" omit-xml-declaration="no" 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="widgetId"/>
|
26
|
<xsl:param name="skinDir"/>
|
27
|
|
28
|
<xsl:param name="tooltip">click to add the layer to the map</xsl:param>
|
29
|
|
30
|
<!-- template rule matching source root element -->
|
31
|
<xsl:template match="/wfs:FeatureCollection">
|
32
|
<table>
|
33
|
<tr>
|
34
|
<th>
|
35
|
Search results:
|
36
|
</th>
|
37
|
</tr>
|
38
|
<xsl:apply-templates select="gml:featureMember/owscat:service_resources"/>
|
39
|
</table>
|
40
|
</xsl:template>
|
41
|
|
42
|
<!-- template rule matching source root element -->
|
43
|
<xsl:template match="owscat:service_resources">
|
44
|
<xsl:variable name="rowClass">altRow_<xsl:value-of select="position() mod 2"/></xsl:variable>
|
45
|
<xsl:variable name="abstract" select="owscat:abstract"/>
|
46
|
<xsl:variable name="name" select="owscat:name"/>
|
47
|
<tr class="{$rowClass}">
|
48
|
<td>
|
49
|
<h4>
|
50
|
<a href="javascript:config.objects.addLayer.addLayerFromCat('{$name}')" class="mbButton">
|
51
|
<img src="{$skinDir}/images/LayerAddDisable.png" title="{$tooltip}" border="0"/>
|
52
|
</a>
|
53
|
<xsl:value-of select="owscat:title"/></h4>
|
54
|
<xsl:value-of select="concat(substring($abstract, 0, 200),'...')"/>
|
55
|
<span class="dataSource">provided by: <xsl:value-of select="owscat:organization"/></span>
|
56
|
</td>
|
57
|
</tr>
|
58
|
</xsl:template>
|
59
|
|
60
|
<xsl:template match="text()|@*"/>
|
61
|
|
62
|
</xsl:stylesheet>
|