1
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
|
3
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:eo1="http://eo1.gsfc.nasa.gov/" version="1.0">
|
4
|
|
5
|
<!--
|
6
|
Description: Convert a GeoBliki WFS response into a OL popup text.
|
7
|
Author: Andreas Hocevar
|
8
|
$Id: datapopup.xsl 3907 2008-03-06 10:27:06Z steven $
|
9
|
-->
|
10
|
|
11
|
<xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
|
12
|
|
13
|
<!-- Common params for all widgets -->
|
14
|
<xsl:param name="modelId" />
|
15
|
<xsl:param name="widgetId" />
|
16
|
|
17
|
<!-- params for this widget -->
|
18
|
<xsl:param name="fid" />
|
19
|
|
20
|
<!-- Main html - It matches only non-empty results -->
|
21
|
<xsl:template match="/">
|
22
|
<div class="PopupContainer">
|
23
|
<div class="PopupHeader">Info</div>
|
24
|
<div class="PopupContent">
|
25
|
<xsl:apply-templates />
|
26
|
</div>
|
27
|
</div>
|
28
|
</xsl:template>
|
29
|
|
30
|
<!-- featureInfo -->
|
31
|
<xsl:template match="wfs:FeatureCollection/gml:featureMember/eo1:ali|wfs:FeatureCollection/gml:featureMember/eo1:hyperion">
|
32
|
<xsl:if test="@fid=$fid">
|
33
|
<table cellspacing="0" border="0">
|
34
|
<tr>
|
35
|
<td>
|
36
|
<xsl:element name="img">
|
37
|
<xsl:attribute name="height">200</xsl:attribute>
|
38
|
<xsl:attribute name="src">
|
39
|
<xsl:value-of select="eo1:lowres_href" />
|
40
|
</xsl:attribute>
|
41
|
</xsl:element>
|
42
|
</td>
|
43
|
<td>
|
44
|
<b>Id:</b>
|
45
|
<xsl:value-of select="eo1:id" />
|
46
|
<br />
|
47
|
<b>Name:</b>
|
48
|
<xsl:value-of select="eo1:name" />
|
49
|
<br />
|
50
|
<b>Scene:</b>
|
51
|
<xsl:value-of select="eo1:scene" />
|
52
|
<br />
|
53
|
<b>Rights:</b>
|
54
|
<xsl:value-of select="eo1:rights" />
|
55
|
<br />
|
56
|
<b>Goal Id:</b>
|
57
|
<xsl:value-of select="eo1:goal_id" />
|
58
|
<br />
|
59
|
<b>Lat:</b>
|
60
|
<xsl:value-of select="eo1:latitude" />
|
61
|
<br />
|
62
|
<b>Lon:</b>
|
63
|
<xsl:value-of select="eo1:longitude" />
|
64
|
<br />
|
65
|
<b>Link:</b>
|
66
|
<xsl:element name="a">
|
67
|
<xsl:attribute name="href">
|
68
|
<xsl:value-of select="eo1:article_href" />
|
69
|
</xsl:attribute>
|
70
|
here
|
71
|
</xsl:element>
|
72
|
<br />
|
73
|
</td>
|
74
|
</tr>
|
75
|
</table>
|
76
|
</xsl:if>
|
77
|
</xsl:template>
|
78
|
|
79
|
<!-- Remove documentation, text, comments -->
|
80
|
<xsl:template match="comment()|text()|processing-instruction()"></xsl:template>
|
81
|
</xsl:stylesheet>
|