1
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
|
3
|
<!--
|
4
|
Description: transforms a WFS FeatureType node to a DescribeFeatureType request
|
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:mb="http://mapbuilder.sourceforge.net/mapbuilder"
|
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
|
<xsl:param name="httpMethod">get</xsl:param>
|
24
|
<xsl:param name="version"/>
|
25
|
|
26
|
<!-- template rule matching source root element -->
|
27
|
<xsl:template match="/wps:Capabilities/wps:ProcessOfferings">
|
28
|
<DescribeProcess version="{$version}" service="WPS">
|
29
|
<xsl:apply-templates select="wps:Process"/>
|
30
|
</DescribeProcess>
|
31
|
</xsl:template>
|
32
|
|
33
|
<!-- template rule matching source root element -->
|
34
|
<xsl:template match="wps:Process">
|
35
|
<xsl:choose>
|
36
|
<xsl:when test="$httpMethod='post'">
|
37
|
<ProcessName><xsl:value-of select="wps:Name"/></ProcessName>
|
38
|
</xsl:when>
|
39
|
<xsl:otherwise>
|
40
|
<mb:QueryString>
|
41
|
<xsl:variable name="query">
|
42
|
request=DescribeProcess
|
43
|
&service=WPS
|
44
|
&version=<xsl:value-of select="$version"/>
|
45
|
&ProcessName=<xsl:value-of select="wps:Name"/>
|
46
|
</xsl:variable>
|
47
|
<xsl:value-of select="translate(normalize-space($query),' ', '' )" disable-output-escaping="no"/>
|
48
|
</mb:QueryString>
|
49
|
</xsl:otherwise>
|
50
|
</xsl:choose>
|
51
|
</xsl:template>
|
52
|
|
53
|
<xsl:template match="text()|@*"/>
|
54
|
|
55
|
</xsl:stylesheet>
|