Project

General

Profile

1
<?xml version="1.0"?>
2
<xsl:stylesheet
3
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
        xmlns:gml="http://www.opengis.net/gml/3.2" version="1.0">
5

    
6
    <xsl:template match="gml:Point">
7
        <!-- TODO -->
8
    </xsl:template>
9

    
10
    <!-- 
11
    gml:Polygon
12
    This is a very incomplete template for showing gml:Polygons 
13
    -->
14
    <xsl:template match="gml:Polygon">
15
        <xsl:variable name="coordinates">
16
            <xsl:value-of select="./gml:exterior/gml:LinearRing/gml:coordinates/@decimal" />
17
        </xsl:variable>
18

    
19
        <xsl:element name="div">
20
            <xsl:attribute name="class">control-group coordinates</xsl:attribute>
21
            <xsl:attribute name="data-content">coordinates</xsl:attribute>
22
            <xsl:attribute name="data-value"><xsl:value-of select="$coordinates" /></xsl:attribute>
23

    
24
            <label class="control-label">Coordinates</label>
25
            <div class="controls">
26
                <div class="controls-well">
27
                    <xsl:choose>
28
                        <xsl:when test="$coordinates and normalize-space($coordinates)!=''">
29
                            <xsl:value-of select="$coordinates" />                    
30
                        </xsl:when>
31
                        <xsl:otherwise>
32
                            Polygon display not supported by this display. Please see full metadata record for polygon information.
33
                        </xsl:otherwise>
34
                    </xsl:choose>
35
                </div>
36
            </div>
37
        </xsl:element>
38
    </xsl:template>
39

    
40
    <xsl:template match="gml:interior">
41
        <!-- TODO -->
42
    </xsl:template>
43

    
44
    <xsl:template match="gml:LinearRing">
45
        <!-- TODO -->
46
    </xsl:template>
47

    
48
    <xsl:template match="gml:LineString">
49
        <!-- TODO -->
50
    </xsl:template>
51
</xsl:stylesheet>
(5-5/8)