source: trunk/zoo-project/zoo-kernel/xslt/updateExecute.xsl

Last change on this file was 908, checked in by djay, 3 years ago

Update HISTORY.txt. Fix file size issue. Fix issue #168. Add missing xslt file.

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1<xsl:stylesheet version="1.0"
2                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                xmlns:ows="http://www.opengis.net/ows/1.1"
4                xmlns:ns14="http://www.opengis.net/wps/2.0"
5                xmlns:wps="http://www.opengis.net/wps/2.0"
6                xmlns:xlink="http://www.w3.org/1999/xlink">
7
8  <!--
9      This template is used by the ZOO-Kernel to generate a specific
10      OGC WPS Execute request in case of rest service callback use.
11      In such a case the ZOO-Kernel replace every input provided by
12      value in the initial request and replace the data section by the
13      reference to the published ressource.
14      So, this template is basically made to replace any input provided
15      by value to the corresponding local WCS/WFS OGC web service
16      references.
17      --> 
18  <xsl:output method="xml"/>
19  <xsl:param name="value" select="string('-1')"/>
20  <xsl:param name="attr" select="string('-1')"/>
21  <xsl:param name="cnt" select="string('-1')"/>
22  <xsl:param name="index" select="0"/>
23
24  <xsl:template match="@*|node()">
25    <xsl:copy>
26      <xsl:apply-templates select="@*|node()"/>
27    </xsl:copy>
28  </xsl:template>
29
30 
31  <xsl:template match="/wps:Execute/wps:Input">
32    <xsl:choose>
33      <xsl:when test="@id=$attr">
34        <xsl:copy>
35          <xsl:attribute name="id">
36            <xsl:value-of select="@id"/>
37          </xsl:attribute>
38          <ns14:Reference>
39            <xsl:attribute name="xlink:href">
40              <xsl:value-of select="$value"/>
41            </xsl:attribute>
42            <xsl:if test="./wps:Data[@mimeType!='']">
43              <xsl:attribute name="mimeType">
44                <xsl:value-of select="./wps:Data[@mimeType]"/>
45              </xsl:attribute>
46              <xsl:attribute name="encoding">
47                <xsl:value-of select="./wps:Data[@encoding]"/>
48              </xsl:attribute>
49              <xsl:attribute name="schema">
50                <xsl:value-of select="./wps:Data[@schema]"/>
51              </xsl:attribute>
52            </xsl:if>
53          </ns14:Reference>
54        </xsl:copy>
55      </xsl:when>
56      <xsl:otherwise>
57        <xsl:copy-of select="."/>
58      </xsl:otherwise>
59    </xsl:choose>
60  </xsl:template>
61
62 
63</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png