1
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
|
3
|
<!--
|
4
|
Description: parses an listing of OGC services from the Discovery Portal registry
|
5
|
Author: adair
|
6
|
Licence: LGPL as specified in http://www.gnu.org/copyleft/lesser.html .
|
7
|
|
8
|
$Id: CatalogSearchForm.xsl 3285 2007-09-20 09:31:07Z rdewit $
|
9
|
$Name: $
|
10
|
-->
|
11
|
|
12
|
<xsl:stylesheet version="1.0"
|
13
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
14
|
xmlns:ogc="http://www.opengis.net/ogc"
|
15
|
xmlns:gml="http://www.opengis.net/gml"
|
16
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
17
|
|
18
|
<xsl:output method="xml" omit-xml-declaration="yes" encoding="utf-8" indent="yes"/>
|
19
|
|
20
|
<!-- The coordinates of the DHTML Layer on the HTML page -->
|
21
|
<xsl:param name="modelTitle"/>
|
22
|
<xsl:param name="modelId"/>
|
23
|
<xsl:param name="widgetId"/>
|
24
|
<xsl:param name="targetModelId"/>
|
25
|
<xsl:param name="targetModel"/>
|
26
|
<xsl:param name="lang">en</xsl:param>
|
27
|
|
28
|
<xsl:param name="webServiceUrl">http://devgeo.cciw.ca/cgi-bin/mapserv/owscat</xsl:param>
|
29
|
<xsl:param name="formName">owsCatSearch</xsl:param>
|
30
|
<!-- NOTE: it's really bad form to put a hard-coded URL here, but it's the only way to use the document() function in IE -->
|
31
|
<!--xsl:param name="searchConfigDoc" select="document('http://demo.communitymapbuilder.org/mapbuilder-lib-1.0-release/demo/contextEditor/searchConfig.xml')"/-->
|
32
|
<xsl:param name="searchConfigDoc" select="document('http://geodiscover.cgdi.ca/mapbuilder/demo/contextEditor/searchConfig.xml')"/>
|
33
|
<xsl:param name="selectSize" select="1"/>
|
34
|
|
35
|
<!-- Text params for this widget -->
|
36
|
<xsl:param name="north">North</xsl:param>
|
37
|
<xsl:param name="south">South</xsl:param>
|
38
|
<xsl:param name="east">East</xsl:param>
|
39
|
<xsl:param name="west">West</xsl:param>
|
40
|
|
41
|
<!-- template rule matching source root element -->
|
42
|
<xsl:template match="/">
|
43
|
<div>
|
44
|
<h2>Search for layers</h2>
|
45
|
<form name="{$formName}" id="{$formName}" method="get" onsubmit="config.objects.{$widgetId}.doSelect();return false;">
|
46
|
<!--
|
47
|
<input type="hidden" name="version" value="1.0.0"/>
|
48
|
<input type="hidden" name="service" value="WFS"/>
|
49
|
<input type="hidden" name="request" value="GetFeature"/>
|
50
|
<input type="hidden" name="typename" value="service_resources"/>
|
51
|
<input type="hidden" name="outputFormat" value="GML3"/>
|
52
|
-->
|
53
|
<table>
|
54
|
<tr>
|
55
|
<td>
|
56
|
<h3>Keywords</h3>
|
57
|
</td>
|
58
|
<td>
|
59
|
<h3>Service Type</h3>
|
60
|
</td>
|
61
|
<td/>
|
62
|
</tr>
|
63
|
<tr>
|
64
|
<td>
|
65
|
<input type="text" name="keywords" value=""/>
|
66
|
</td>
|
67
|
<td>
|
68
|
<select name="serviceType" id="serviceType">
|
69
|
<option></option>
|
70
|
<option value="WMS">WMS</option>
|
71
|
<option value="WFS">WFS</option>
|
72
|
</select>
|
73
|
<input type="submit" value="search"/>
|
74
|
</td>
|
75
|
<td>
|
76
|
<div id="loading"></div>
|
77
|
</td>
|
78
|
</tr>
|
79
|
</table>
|
80
|
<!--
|
81
|
<div id="locations">
|
82
|
<xsl:call-template name="aoiBox"/>
|
83
|
</div>
|
84
|
-->
|
85
|
|
86
|
</form>
|
87
|
|
88
|
</div>
|
89
|
</xsl:template>
|
90
|
|
91
|
<xsl:template name="locations">
|
92
|
<xsl:param name="locationsDoc"/>
|
93
|
<div>
|
94
|
<select name="locations" onchange="config.objects.{$widgetId}.setLocation(this.options[this.selectedIndex].value);" size="{$selectSize}">
|
95
|
<xsl:apply-templates select="$locationsDoc/searchConfig[@entryType='productCollection']/locations/location"/>
|
96
|
</select>
|
97
|
</div>
|
98
|
</xsl:template>
|
99
|
|
100
|
<xsl:template match="location">
|
101
|
<xsl:param name="indent"/>
|
102
|
<xsl:variable name="bbox" select="translate(wens,' ',',')"/>
|
103
|
<option value="{$bbox}"><xsl:value-of select="$indent"/><xsl:value-of select="title[@lang=$lang]"/></option>
|
104
|
<xsl:apply-templates select="location">
|
105
|
<xsl:with-param name="indent"><xsl:value-of select="$indent"/>  </xsl:with-param>
|
106
|
</xsl:apply-templates>
|
107
|
</xsl:template>
|
108
|
|
109
|
<!--
|
110
|
<xsl:template name="aoiBox">
|
111
|
<h3>Location</h3>
|
112
|
<table>
|
113
|
<tr>
|
114
|
<td><xsl:value-of select="$west"/></td>
|
115
|
<td><xsl:value-of select="$south"/></td>
|
116
|
<td><xsl:value-of select="$east"/></td>
|
117
|
<td><xsl:value-of select="$north"/></td>
|
118
|
</tr>
|
119
|
<tr>
|
120
|
<td>
|
121
|
<input name="westCoord" type="text" size="10" class="searchInput" onblur="config.objects.{$widgetId}.setAoi(config.objects.{$widgetId});"/>
|
122
|
</td>
|
123
|
<td>
|
124
|
<input name="southCoord" type="text" size="10" class="searchInput" onblur="config.objects.{$widgetId}.setAoi(config.objects.{$widgetId});"/>
|
125
|
</td>
|
126
|
<td>
|
127
|
<input name="eastCoord" type="text" size="10" class="searchInput" onblur="config.objects.{$widgetId}.setAoi(config.objects.{$widgetId});"/>
|
128
|
</td>
|
129
|
<td>
|
130
|
<input name="northCoord" type="text" size="10" class="searchInput" onblur="config.objects.{$widgetId}.setAoi(config.objects.{$widgetId});"/>
|
131
|
</td>
|
132
|
</tr>
|
133
|
</table>
|
134
|
</xsl:template>
|
135
|
-->
|
136
|
|
137
|
<xsl:template name="ntsInput">
|
138
|
<p>or enter NTS mapsheet index
|
139
|
<input name="ntsIndex" type="text" size="6" class="searchInput"/>
|
140
|
</p>
|
141
|
</xsl:template>
|
142
|
|
143
|
<xsl:template match="text()|@*"/>
|
144
|
|
145
|
</xsl:stylesheet>
|