svn commit: r387 - trunk/mapbender/http/javascripts/mod_digitize_tab.php
christoph at osgeo.org
christoph at osgeo.org
Tue Jun 6 11:17:54 EDT 2006
Author: christoph
Date: 2006-06-06 15:17:53+0000
New Revision: 387
Modified:
trunk/mapbender/http/javascripts/mod_digitize_tab.php
Log:
namespace handling enhanced
Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_digitize_tab.php?view=diff&rev=387&p1=trunk/mapbender/http/javascripts/mod_digitize_tab.php&p2=trunk/mapbender/http/javascripts/mod_digitize_tab.php&r1=386&r2=387
==============================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php (original)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php 2006-06-06 15:17:53+0000
@@ -802,19 +802,25 @@
}
}
document.sendForm.url.value = myconf['wfs_transaction'];
- var str = '<wfs:Transaction version="1.0.0" service="WFS" ';
-
- str += 'xmlns="http://www.someserver.com/myns" ';
-// str += 'xmlns:gml="http://www.opengis.net/gml" ';
- str += 'xmlns:ogc="http://www.opengis.net/ogc" ';
- str += 'xmlns:wfs="http://www.opengis.net/wfs" ';
- str += 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ';
-// str += 'xmlns:topp="http://www.someserver.com/topp" ';
-
+ var str = '<wfs:Transaction version="1.0.0" service="WFS" xmlns="http://www.someserver.com/myns" ';
+ var ns_gml = false; var ns_ogc = false; var ns_xsi = false; var ns_wfs = false; var ns_topp = false;
+
for (var q = 0 ; q < myconf['namespaces'].length ; q++) {
+ if (myconf['namespaces'][q]['name'] == "gml") ns_gml = true;
+ else if (myconf['namespaces'][q]['name'] == "ogc") ns_ogc = true;
+ else if (myconf['namespaces'][q]['name'] == "xsi") ns_xsi = true;
+ else if (myconf['namespaces'][q]['name'] == "wfs") ns_wfs = true;
+ else if (myconf['namespaces'][q]['name'] == "topp") ns_topp = true;
str += 'xmlns:' + myconf['namespaces'][q]['name'] + '="' + myconf['namespaces'][q]['location'] + '" ';
}
+
+ if (ns_gml == false) str += 'xmlns:gml="http://www.opengis.net/gml" ';
+ if (ns_ogc == false) str += 'xmlns:ogc="http://www.opengis.net/ogc" ';
+ if (ns_xsi == false) str += 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ';
+ if (ns_topp == false) str += 'xmlns:topp="http://www.someserver.com/topp" ';
+ if (ns_wfs == false) str += 'xmlns:wfs="http://www.opengis.net/wfs" ';
+
str += 'xsi:schemaLocation="http://www.someserver.com/myns http://wms1.ccgis.de/geoserver-1.3-beta4/wfs/getCapabilities?request=describefeaturetype&typename=mapbender_user http://www.opengis.net/wfs../wfs/1.0.0/WFS-transaction.xsd">';
More information about the Mapbender_commits
mailing list