metacat/lib/spatial/mapbuilder/lib/tool/xsl/wfs_Insert.xsl @ 3032
1 |
<?xml version="1.0" encoding="ISO-8859-1"?>
|
---|---|
2 |
|
3 |
|
4 |
|
5 |
<!--
|
6 |
|
7 |
Description: Extract FeatureMembers from a FeatureCollection and build
|
8 |
|
9 |
into a WFS Insert transaction.
|
10 |
|
11 |
Author: Cameron Shorter
|
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:xsl="http://www.w3.org/1999/XSL/Transform" |
28 |
|
29 |
xmlns:wfs="http://www.opengis.net/wfs" |
30 |
|
31 |
xmlns:gml="http://www.opengis.net/gml"> |
32 |
|
33 |
|
34 |
|
35 |
<xsl:output method="xml" omit-xml-declaration="no" encoding="utf-8" indent="yes"/> |
36 |
|
37 |
|
38 |
|
39 |
<!-- Match root -->
|
40 |
|
41 |
<xsl:template match="/"> |
42 |
|
43 |
<wfs:Transaction>
|
44 |
|
45 |
<wfs:Insert>
|
46 |
|
47 |
<xsl:apply-templates/>
|
48 |
|
49 |
</wfs:Insert>
|
50 |
|
51 |
</wfs:Transaction>
|
52 |
|
53 |
</xsl:template>
|
54 |
|
55 |
|
56 |
|
57 |
<!-- Match featureMember -->
|
58 |
|
59 |
<xsl:template match="gml:featureMember"> |
60 |
|
61 |
<xsl:for-each select="./*"> |
62 |
|
63 |
<xsl:copy-of select="."/> |
64 |
|
65 |
</xsl:for-each>
|
66 |
|
67 |
</xsl:template>
|
68 |
|
69 |
|
70 |
|
71 |
<xsl:template match="text()|@*"/> |
72 |
|
73 |
</xsl:stylesheet>
|
74 |
|