Project

General

Profile

1
<?xml version="1.0" encoding="ISO-8859-1"?>
2

    
3

    
4

    
5
<!--
6

    
7
Description: presents the list of FeatureTypes from a WFS capabilities doc.
8

    
9
            Links provided to filter and load the selected FeatureType.
10

    
11
Author:      adair
12

    
13
Licence:     LGPL as specified in http://www.gnu.org/copyleft/lesser.html .
14

    
15

    
16

    
17
$Id$
18

    
19
$Name$
20

    
21
-->
22

    
23

    
24

    
25
<xsl:stylesheet version="1.0" 
26

    
27
    xmlns:wfs="http://www.opengis.net/wfs"
28

    
29
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
30

    
31
		xmlns:ogc="http://www.opengis.net/ogc"
32

    
33
		xmlns:gml="http://www.opengis.net/gml"
34

    
35
    xmlns:xlink="http://www.w3.org/1999/xlink">
36

    
37

    
38

    
39
  <xsl:output method="xml" omit-xml-declaration="no" encoding="utf-8" indent="yes"/>
40

    
41

    
42

    
43
  <!-- The coordinates of the DHTML Layer on the HTML page -->
44

    
45
  <xsl:param name="modelId"/>
46

    
47
  <xsl:param name="widgetId"/>
48

    
49
  <xsl:param name="toolId"/>
50

    
51
  
52

    
53
  <!-- template rule matching source root element -->
54

    
55
  <xsl:template match="/wfs:WFS_Capabilities">
56

    
57
    <table>
58

    
59
      <tr>
60

    
61
        <th>
62

    
63
          Feature types from: <xsl:value-of select="wfs:Service/wfs:Title"/>
64

    
65
        </th>
66

    
67
        <td colspan="2">
68

    
69
          <a href="javascript:config.paintWidget(config.objects.wfsServerList)">Back to list</a>
70

    
71
        </td>
72

    
73
      </tr>
74

    
75
      <xsl:apply-templates select="wfs:FeatureTypeList/wfs:FeatureType"/>
76

    
77
    </table>
78

    
79
  </xsl:template>
80

    
81

    
82

    
83
  <!-- template rule matching source root element -->
84

    
85
  <xsl:template match="wfs:FeatureType">
86

    
87
    <xsl:variable name="name"><xsl:value-of select="wfs:Name"/></xsl:variable>
88

    
89
    <xsl:variable name="title"><xsl:value-of select="wfs:Title"/></xsl:variable>
90

    
91
    <xsl:variable name="id"><xsl:value-of select="@id"/></xsl:variable>
92

    
93
    <tr>
94

    
95
      <td>
96

    
97
        <xsl:value-of select="$title"/> (<xsl:value-of select="$name"/>) <xsl:value-of select="wfs:SRS"/>
98

    
99
      </td>
100

    
101
      <td>
102

    
103
        <a href="javascript:config.objects.{$modelId}.setParam('wfs_GetFeature','{$name}')">load</a>
104

    
105
      </td>
106

    
107
      <td>
108

    
109
        <a href="javascript:config.objects.{$modelId}.setParam('wfs_DescribeFeatureType','{$name}')">filter</a>
110

    
111
      </td>
112

    
113
    </tr>
114

    
115
  </xsl:template>
116

    
117

    
118

    
119
  <xsl:template match="text()|@*"/>
120

    
121

    
122

    
123
</xsl:stylesheet>
124

    
(82-82/111)