1 |
4307
|
leinfelder
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gml3="http://www.opengis.net/gml/3.1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:georss="http://www.georss.org/georss" xmlns:wfs="http://www.opengis.net/wfs" xmlns:mb="http://mapbuilder.sourceforge.net/mapbuilder">
|
3 |
|
|
<!--
|
4 |
|
|
Description: A stylesheet to convert strange geobliki wfs to standards-compliant wfs.
|
5 |
|
|
Author: Andreas Hocevar andreas.hocevarATgmail.com
|
6 |
|
|
Licence: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
7 |
|
|
|
8 |
|
|
$Id: georss2wfs.xsl 3926 2008-03-20 14:13:35Z steven $
|
9 |
|
|
-->
|
10 |
|
|
<xsl:template match="rdf:RDF">
|
11 |
|
|
<wfs:FeatureCollection>
|
12 |
|
|
<xsl:for-each select="rss:item">
|
13 |
|
|
<xsl:call-template name="featureMember"/>
|
14 |
|
|
</xsl:for-each>
|
15 |
|
|
</wfs:FeatureCollection>
|
16 |
|
|
</xsl:template>
|
17 |
|
|
|
18 |
|
|
<xsl:template name="featureMember">
|
19 |
|
|
<gml:featureMember>
|
20 |
|
|
<mb:geoRssFeature>
|
21 |
|
|
<xsl:attribute name="fid"><xsl:value-of select="./@id"/></xsl:attribute>
|
22 |
|
|
<mb:geom>
|
23 |
|
|
<xsl:call-template name="point"/>
|
24 |
|
|
<xsl:call-template name="lineString"/>
|
25 |
|
|
</mb:geom>
|
26 |
|
|
</mb:geoRssFeature>
|
27 |
|
|
</gml:featureMember>
|
28 |
|
|
</xsl:template>
|
29 |
|
|
|
30 |
|
|
<xsl:template name="point">
|
31 |
|
|
<xsl:if test="georss:where/gml3:Point">
|
32 |
|
|
<gml:Point>
|
33 |
|
|
<gml:pos><xsl:value-of select="georss:where/gml3:Point/gml3:pos"/></gml:pos>
|
34 |
|
|
</gml:Point>
|
35 |
|
|
</xsl:if>
|
36 |
|
|
</xsl:template>
|
37 |
|
|
|
38 |
|
|
<xsl:template name="lineString">
|
39 |
|
|
<xsl:if test="georss:where/gml3:LineString">
|
40 |
|
|
<gml:LineString>
|
41 |
|
|
<gml:posList dimension="2"><xsl:value-of select="translate(georss:where/gml3:LineString/gml3:posList, ',', ' ')"/></gml:posList>
|
42 |
|
|
</gml:LineString>
|
43 |
|
|
</xsl:if>
|
44 |
|
|
</xsl:template>
|
45 |
|
|
|
46 |
|
|
</xsl:stylesheet>
|