1
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
|
3
|
<!--
|
4
|
Description: parses an OGC context document to generate an array of DHTML layers.
|
5
|
Author: adair
|
6
|
Licence: LGPL as specified in http://www.gnu.org/copyleft/lesser.html .
|
7
|
|
8
|
$Id$
|
9
|
$Name$
|
10
|
-->
|
11
|
|
12
|
<xsl:stylesheet version="1.0"
|
13
|
xmlns:wps="http://www.opengis.net/wps"
|
14
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
15
|
xmlns:ogc="http://www.opengis.net/ogc"
|
16
|
xmlns:ows="http://www.opengis.net/ows"
|
17
|
xmlns:gml="http://www.opengis.net/gml"
|
18
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
19
|
|
20
|
<xsl:output method="xml" omit-xml-declaration="no" encoding="utf-8" indent="yes"/>
|
21
|
|
22
|
<!-- The coordinates of the DHTML Layer on the HTML page -->
|
23
|
<xsl:param name="modelId"/>
|
24
|
<xsl:param name="modelUrl"/>
|
25
|
<xsl:param name="widgetId"/>
|
26
|
<xsl:param name="toolId"/>
|
27
|
|
28
|
<xsl:param name="webServiceUrl"/>
|
29
|
<xsl:param name="webServiceMethod"/>
|
30
|
<xsl:param name="formName"/>
|
31
|
|
32
|
<!-- template rule matching source root element -->
|
33
|
<xsl:template match="/wps:ProcessDescription/wps:ProcessMember/wps:Process">
|
34
|
<xsl:variable name="name"><xsl:value-of select="wps:Name"/></xsl:variable>
|
35
|
<div>
|
36
|
<form name="{$formName}" id="{$formName}" action="{$webServiceUrl}">
|
37
|
<input type="hidden" name="request" value="Execute"/>
|
38
|
<input type="hidden" name="service" value="WPS"/>
|
39
|
<input type="hidden" name="version" value="0.2.4"/>
|
40
|
<input type="hidden" name="ProcessName" value="{$name}"/>
|
41
|
|
42
|
<p style="text-align:right;font:70%;margin:0"><a href="{$modelUrl}" target="modelXML">DescribeProcess response</a></p>
|
43
|
<table cellspacing="0" border="1" width="100%">
|
44
|
<tr>
|
45
|
<th align="left">Set parameters for:<xsl:value-of select="$name"/></th>
|
46
|
<th align="right"><a href="javascript:config.objects.{$widgetId}.executeProcess('{$name}')">Execute</a>
|
47
|
(<xsl:value-of select="$webServiceMethod"/>)
|
48
|
</th>
|
49
|
</tr>
|
50
|
<tr>
|
51
|
<td colspan="2">
|
52
|
<dl>
|
53
|
<dt><xsl:value-of select="wps:Label"/></dt>
|
54
|
<dd><xsl:value-of select="wps:Description"/></dd>
|
55
|
</dl>
|
56
|
</td>
|
57
|
</tr>
|
58
|
<tr>
|
59
|
<td>Input parameters</td>
|
60
|
<td>value</td>
|
61
|
</tr>
|
62
|
<xsl:apply-templates select="wps:Input"/>
|
63
|
</table>
|
64
|
</form>
|
65
|
</div>
|
66
|
</xsl:template>
|
67
|
|
68
|
<xsl:template match="wps:Output/wps:Parameter"/>
|
69
|
|
70
|
<xsl:template match="wps:Input/wps:Parameter">
|
71
|
<xsl:variable name="paramName"><xsl:value-of select="wps:Name"/></xsl:variable>
|
72
|
<tr>
|
73
|
<td>
|
74
|
<dl class="params">
|
75
|
<dt><xsl:value-of select="wps:Label"/></dt>
|
76
|
<dd><xsl:value-of select="wps:Description"/></dd>
|
77
|
<dd>datatype: <xsl:value-of select="name(wps:Datatype/*)"/></dd>
|
78
|
<xsl:if test="wps:Datatype/wps:Reference/@xlink:href">
|
79
|
</xsl:if>
|
80
|
</dl>
|
81
|
</td>
|
82
|
<td>
|
83
|
<xsl:apply-templates select="wps:Datatype/*">
|
84
|
<xsl:with-param name="paramName" select="$paramName"/>
|
85
|
</xsl:apply-templates>
|
86
|
</td>
|
87
|
</tr>
|
88
|
</xsl:template>
|
89
|
|
90
|
<xsl:template match="wps:LiteralValue">
|
91
|
<xsl:param name="paramName"/>
|
92
|
<input type="text" name="{$paramName}" onblur="config.objects.{$modelId}.parentModel.setParam('{$paramName}',this.value)">
|
93
|
<xsl:if test="string-length(wps:DefaultValue)>0">
|
94
|
<xsl:attribute name="value"><xsl:value-of select="wps:DefaultValue"/></xsl:attribute>
|
95
|
</xsl:if>
|
96
|
</input>
|
97
|
<br/>
|
98
|
<span>type: <xsl:value-of select="@ows:type"/></span>
|
99
|
</xsl:template>
|
100
|
|
101
|
<xsl:template match="wps:Reference">
|
102
|
<xsl:param name="paramName"/>
|
103
|
<input type="text" size="30" name="{$paramName}" onblur="config.objects.{$modelId}.parentModel.setParam('{$paramName}',this.value)">
|
104
|
<xsl:if test="string-length(@xlink:href)>0">
|
105
|
<xsl:attribute name="value"><xsl:value-of select="@xlink:href"/></xsl:attribute>
|
106
|
</xsl:if>
|
107
|
</input>
|
108
|
<br/>
|
109
|
<span>format: <xsl:value-of select="ows:Format"/></span>
|
110
|
<div id="{$widgetId}_{$paramName}_dataSelectorWidget"></div>
|
111
|
</xsl:template>
|
112
|
|
113
|
<xsl:template match="wps:BoundingBox">
|
114
|
use the set AOI button in the map to set the bbox
|
115
|
<table>
|
116
|
<tr>
|
117
|
<td>
|
118
|
</td>
|
119
|
<td>
|
120
|
north: <input NAME="northCoord" TYPE="text" SIZE="10" STYLE="font: 8pt Verdana, geneva, arial, sans-serif;"/>
|
121
|
</td>
|
122
|
<td>
|
123
|
</td>
|
124
|
</tr>
|
125
|
<tr>
|
126
|
<td>
|
127
|
west: <input NAME="westCoord" TYPE="text" SIZE="10" STYLE="font: 8pt Verdana, geneva, arial, sans-serif;"/>
|
128
|
</td>
|
129
|
<td>
|
130
|
</td>
|
131
|
<td>
|
132
|
east: <input NAME="eastCoord" TYPE="text" SIZE="10" STYLE="font: 8pt Verdana, geneva, arial, sans-serif;"/>
|
133
|
</td>
|
134
|
</tr>
|
135
|
<tr>
|
136
|
<td>
|
137
|
</td>
|
138
|
<td>
|
139
|
south: <input NAME="southCoord" TYPE="text" SIZE="10" STYLE="font: 8pt Verdana, geneva, arial, sans-serif;"/>
|
140
|
</td>
|
141
|
<td>
|
142
|
</td>
|
143
|
</tr>
|
144
|
</table>
|
145
|
</xsl:template>
|
146
|
|
147
|
<xsl:template match="text()|@*"/>
|
148
|
|
149
|
</xsl:stylesheet>
|