Revision 4307
Added by ben leinfelder over 15 years ago
wcs_GetCoverage.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<!-- |
|
3 |
Description: transforms an OWS Context document Coverage resource element into |
|
4 |
the request string (HTTP GET only for now) |
|
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:wmc="http://www.opengis.net/context" |
|
14 |
xmlns:mb="http://mapbuilder.sourceforge.net/mapbuilder" |
|
15 |
xmlns:param="http;//www.opengis.net/param" |
|
16 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
17 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
|
18 |
|
|
19 |
<xsl:output method="xml"/> |
|
20 |
<xsl:strip-space elements="*"/> |
|
21 |
|
|
22 |
<xsl:param name="bBoxMinX"/> |
|
23 |
<xsl:param name="bBoxMinY"/> |
|
24 |
<xsl:param name="bBoxMaxX"/> |
|
25 |
<xsl:param name="bBoxMaxY"/> |
|
26 |
<xsl:param name="width"/> |
|
27 |
<xsl:param name="height"/> |
|
28 |
<xsl:param name="srs"/> |
|
29 |
<xsl:param name="version"/> |
|
30 |
|
|
31 |
<xsl:template match="wmc:Coverage"> |
|
32 |
<xsl:variable name="bbox"> |
|
33 |
<xsl:value-of select="$bBoxMinX"/>,<xsl:value-of select="$bBoxMinY"/>, |
|
34 |
<xsl:value-of select="$bBoxMaxX"/>,<xsl:value-of select="$bBoxMaxY"/> |
|
35 |
</xsl:variable> |
|
36 |
<GetCoverage> |
|
37 |
<mb:QueryString> |
|
38 |
<xsl:variable name="src"> |
|
1 |
<?xml version="1.0"?> |
|
2 |
<xsl:stylesheet xmlns:wmc="http://www.opengis.net/context" xmlns:mb="http://mapbuilder.sourceforge.net/mapbuilder" xmlns:param="http;//www.opengis.net/param" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes"/><xsl:strip-space elements="*"/><xsl:param name="bBoxMinX"/><xsl:param name="bBoxMinY"/><xsl:param name="bBoxMaxX"/><xsl:param name="bBoxMaxY"/><xsl:param name="width"/><xsl:param name="height"/><xsl:param name="srs"/><xsl:param name="version"/><xsl:template match="wmc:Coverage"><xsl:variable name="bbox"><xsl:value-of select="$bBoxMinX"/>,<xsl:value-of select="$bBoxMinY"/>, |
|
3 |
<xsl:value-of select="$bBoxMaxX"/>,<xsl:value-of select="$bBoxMaxY"/></xsl:variable><GetCoverage><mb:QueryString><xsl:variable name="src"> |
|
39 | 4 |
VERSION=<xsl:value-of select="$version"/> |
40 | 5 |
&REQUEST=GetCoverage |
41 | 6 |
&SERVICE=WCS |
... | ... | |
44 | 9 |
&WIDTH=<xsl:value-of select="$width"/> |
45 | 10 |
&HEIGHT=<xsl:value-of select="$height"/> |
46 | 11 |
&COVERAGE=<xsl:value-of select="wmc:Name"/> |
47 |
&FORMAT=<xsl:value-of select="wmc:FormatList/wmc:Format[@current='1']"/> |
|
48 |
<xsl:for-each select="wmc:DimensionList/wmc:Dimension"> |
|
49 |
&<xsl:value-of select="@name"/>=<xsl:value-of select="."/> |
|
50 |
</xsl:for-each> |
|
51 |
<xsl:for-each select="wmc:ParameterList/wmc:Parameter"> |
|
52 |
&<xsl:value-of select="param:kvp/@name"/>=<xsl:value-of select="param:kvp/@value"/> |
|
53 |
</xsl:for-each> |
|
54 |
</xsl:variable> |
|
55 |
<xsl:value-of select="translate(normalize-space($src),' ', '' )" disable-output-escaping="no"/> |
|
56 |
</mb:QueryString> |
|
57 |
</GetCoverage> |
|
58 |
</xsl:template> |
|
59 |
|
|
60 |
<xsl:template match="text()|@*"/> |
|
61 |
|
|
62 |
</xsl:stylesheet> |
|
12 |
&FORMAT=<xsl:value-of select="wmc:FormatList/wmc:Format[@current='1']"/><xsl:for-each select="wmc:DimensionList/wmc:Dimension"> |
|
13 |
&<xsl:value-of select="@name"/>=<xsl:value-of select="."/></xsl:for-each><xsl:for-each select="wmc:ParameterList/wmc:Parameter"> |
|
14 |
&<xsl:value-of select="param:kvp/@name"/>=<xsl:value-of select="param:kvp/@value"/></xsl:for-each></xsl:variable><xsl:value-of select="translate(normalize-space($src),' ', '' )" disable-output-escaping="no"/></mb:QueryString></GetCoverage></xsl:template><xsl:template match="text()|@*"/></xsl:stylesheet> |
Also available in: Unified diff
upgrade to MapBuilder 1.5rc2 - includes support for Firefox 3 compatibility (yes, it is also EOLed)