metacat/lib/spatial/mapbuilder/lib/tool/xsl/wfs_Delete.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 |
-->
|
20 |
|
21 |
|
22 |
|
23 |
<xsl:stylesheet version="1.0" |
24 |
|
25 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
26 |
|
27 |
xmlns:wfs="http://www.opengis.net/wfs" |
28 |
|
29 |
xmlns:ogc="http://www.opengis.net/ogc" |
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 service="WFS" version="1.0.0"> |
44 |
|
45 |
<xsl:apply-templates/>
|
46 |
|
47 |
</wfs:Transaction>
|
48 |
|
49 |
</xsl:template>
|
50 |
|
51 |
|
52 |
|
53 |
<!-- Match featureMember -->
|
54 |
|
55 |
<xsl:template match="gml:featureMember/*[@fid]"> |
56 |
|
57 |
<wfs:Delete typeName="{name()}"> |
58 |
|
59 |
<ogc:Filter>
|
60 |
|
61 |
<ogc:FeatureId fid="{./@fid}"/> |
62 |
|
63 |
</ogc:Filter>
|
64 |
|
65 |
</wfs:Delete>
|
66 |
|
67 |
</xsl:template>
|
68 |
|
69 |
|
70 |
|
71 |
<xsl:template match="text()|@*"/> |
72 |
|
73 |
</xsl:stylesheet>
|
74 |
|