1
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
|
3
|
<!--
|
4
|
Description: Extract FeatureMembers from a FeatureCollection and build
|
5
|
into a WFS Insert transaction.
|
6
|
Author: Cameron Shorter
|
7
|
Licence: LGPL as specified in http://www.gnu.org/copyleft/lesser.html .
|
8
|
|
9
|
$Id$
|
10
|
$Name$
|
11
|
-->
|
12
|
|
13
|
<xsl:stylesheet version="1.0"
|
14
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
15
|
xmlns:wfs="http://www.opengis.net/wfs"
|
16
|
xmlns:gml="http://www.opengis.net/gml"
|
17
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
18
|
|
19
|
<xsl:output method="xml" omit-xml-declaration="no" encoding="utf-8" indent="yes"/>
|
20
|
|
21
|
<!-- Match root -->
|
22
|
<xsl:template match="/">
|
23
|
<wfs:Transaction>
|
24
|
<wfs:Insert>
|
25
|
<xsl:apply-templates/>
|
26
|
</wfs:Insert>
|
27
|
</wfs:Transaction>
|
28
|
</xsl:template>
|
29
|
|
30
|
<!-- Match featureMember -->
|
31
|
<xsl:template match="gml:featureMember">
|
32
|
<xsl:for-each select="./*">
|
33
|
<xsl:copy-of select="."/>
|
34
|
</xsl:for-each>
|
35
|
</xsl:template>
|
36
|
|
37
|
<xsl:template match="text()|@*"/>
|
38
|
</xsl:stylesheet>
|