[Mapbender-commits] r1931 - branches/mapbender_sld/http/sld
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Dec 18 10:17:01 EST 2007
Author: mschulz
Date: 2007-12-18 10:17:01 -0500 (Tue, 18 Dec 2007)
New Revision: 1931
Modified:
branches/mapbender_sld/http/sld/sld_edit_filter.php
branches/mapbender_sld/http/sld/sld_filter_parse.php
branches/mapbender_sld/http/sld/sld_function_handler.php
Log:
use ogc: namespace for filter element
Modified: branches/mapbender_sld/http/sld/sld_edit_filter.php
===================================================================
--- branches/mapbender_sld/http/sld/sld_edit_filter.php 2007-12-18 14:35:47 UTC (rev 1930)
+++ branches/mapbender_sld/http/sld/sld_edit_filter.php 2007-12-18 15:17:01 UTC (rev 1931)
@@ -90,31 +90,31 @@
case "NOT":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new UnaryLogicOp("Not");
break;
- case "OGC:PROPERTYISEQUALTO":
+ case "PROPERTYISEQUALTO":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsEqualTo");
break;
- case "OGC:PROPERTYISNOTEQUALTO":
+ case "PROPERTYISNOTEQUALTO":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsNotEqualTo");
break;
- case "OGC:PROPERTYISGREATERTHAN":
+ case "PROPERTYISGREATERTHAN":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsGreaterThan");
break;
- case "OGC:PROPERTYISGREATERTHANOREQUALTO":
+ case "PROPERTYISGREATERTHANOREQUALTO":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsGreaterThanOrEqualTo");
break;
- case "OGC:PROPERTYISLESSTHAN":
+ case "PROPERTYISLESSTHAN":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsLessThan");
break;
- case "OGC:PROPERTYISLESSTHANOREQUALTO":
+ case "PROPERTYISLESSTHANOREQUALTO":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsLessThanOrEqualTo");
break;
- case "OGC:PROPERTYISLIKE":
+ case "PROPERTYISLIKE":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new PropertyIsLike();
break;
- case "OGC:PROPERTYISNULL":
+ case "PROPERTYISNULL":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new PropertyIsNull();
break;
- case "OGC:PROPERTYISBETWEEN":
+ case "PROPERTYISBETWEEN":
$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new PropertyIsBetween();
break;
}
Modified: branches/mapbender_sld/http/sld/sld_filter_parse.php
===================================================================
--- branches/mapbender_sld/http/sld/sld_filter_parse.php 2007-12-18 14:35:47 UTC (rev 1930)
+++ branches/mapbender_sld/http/sld/sld_filter_parse.php 2007-12-18 15:17:01 UTC (rev 1931)
@@ -36,7 +36,7 @@
*/
function parseFilter($data)
{
- $xml_parser = xml_parser_create();
+ $xml_parser = xml_parser_create_ns();
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0);
xml_parse_into_struct($xml_parser, $data, $vals, $index);
xml_parser_free($xml_parser);
@@ -54,7 +54,7 @@
$tagname=strtoupper($tag);
switch($tagname)
{
- case "OGC:FILTER":
+ case "FILTER":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = false;
@@ -141,11 +141,11 @@
$parentactual = $parent[$parentactual];
}
break;
- case "OGC:PROPERTYISEQUALTO":
+ case "PROPERTYISEQUALTO":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = $parentactual;
- $objects[count($parent)-1] = new BinaryComparisonOp("ogc:PropertyIsEqualTo");
+ $objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsEqualTo");
$objects[count($parent)-1]->id = count($parent)-1;
$objects[count($parent)-1]->parent = $parentactual;
$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
@@ -160,11 +160,11 @@
$parentactual = $parent[$parentactual];
}
break;
- case "OGC:PROPERTYISNOTEQUALTO":
+ case "PROPERTYISNOTEQUALTO":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = $parentactual;
- $objects[count($parent)-1] = new BinaryComparisonOp("ogc:PropertyIsNotEqualTo");
+ $objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsNotEqualTo");
$objects[count($parent)-1]->id = count($parent)-1;
$objects[count($parent)-1]->parent = $parentactual;
$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
@@ -179,11 +179,11 @@
$parentactual = $parent[$parentactual];
}
break;
- case "OGC:PROPERTYISGREATERTHAN":
+ case "PROPERTYISGREATERTHAN":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = $parentactual;
- $objects[count($parent)-1] = new BinaryComparisonOp("ogc:PropertyIsGreaterThan");
+ $objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsGreaterThan");
$objects[count($parent)-1]->id = count($parent)-1;
$objects[count($parent)-1]->parent = $parentactual;
$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
@@ -198,11 +198,11 @@
$parentactual = $parent[$parentactual];
}
break;
- case "OGC:PROPERTYISGREATERTHANOREQUALTO":
+ case "PROPERTYISGREATERTHANOREQUALTO":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = $parentactual;
- $objects[count($parent)-1] = new BinaryComparisonOp("ogc:PropertyIsGreaterThanOrEqualTo");
+ $objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsGreaterThanOrEqualTo");
$objects[count($parent)-1]->id = count($parent)-1;
$objects[count($parent)-1]->parent = $parentactual;
$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
@@ -217,11 +217,11 @@
$parentactual = $parent[$parentactual];
}
break;
- case "OGC:PROPERTYISLESSTHAN":
+ case "PROPERTYISLESSTHAN":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = $parentactual;
- $objects[count($parent)-1] = new BinaryComparisonOp("ogc:PropertyIsLessThan");
+ $objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsLessThan");
$objects[count($parent)-1]->id = count($parent)-1;
$objects[count($parent)-1]->parent = $parentactual;
$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
@@ -236,11 +236,11 @@
$parentactual = $parent[$parentactual];
}
break;
- case "OGC:PROPERTYISLESSTHANOREQUALTO":
+ case "PROPERTYISLESSTHANOREQUALTO":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = $parentactual;
- $objects[count($parent)-1] = new BinaryComparisonOp("ogc:PropertyIsLessThanOrEqualTo");
+ $objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsLessThanOrEqualTo");
$objects[count($parent)-1]->id = count($parent)-1;
$objects[count($parent)-1]->parent = $parentactual;
$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
@@ -255,7 +255,7 @@
$parentactual = $parent[$parentactual];
}
break;
- case "OGC:PROPERTYISLIKE":
+ case "PROPERTYISLIKE":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = $parentactual;
@@ -277,7 +277,7 @@
$parentactual = $parent[$parentactual];
}
break;
- case "OGC:PROPERTYISNULL":
+ case "PROPERTYISNULL":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = $parentactual;
@@ -296,7 +296,7 @@
$parentactual = $parent[$parentactual];
}
break;
- case "OGC:PROPERTYISBETWEEN":
+ case "PROPERTYISBETWEEN":
if ($element["type"] == "open" || $element["type"] == "complete")
{
$parent[] = $parentactual;
@@ -316,7 +316,7 @@
}
break;
- case "OGC:LITERAL":
+ case "LITERAL":
if ($element["type"] == "complete")
{
if ($boundary == "upper")
@@ -333,13 +333,13 @@
}
}
break;
- case "OGC:PROPERTYNAME":
+ case "PROPERTYNAME":
if ($element["type"] == "complete")
{
$objects[$parentactual]->ogcPropertyName = $element["value"];
}
break;
- case "OGC:LOWERBOUNDARY":
+ case "LOWERBOUNDARY":
if ($element["type"] == "open")
{
$boundary = "lower";
@@ -349,7 +349,7 @@
$boundary = "";
}
break;
- case "OGC:UPPERBOUNDARY":
+ case "UPPERBOUNDARY":
if ($element["type"] == "open")
{
$boundary = "upper";
Modified: branches/mapbender_sld/http/sld/sld_function_handler.php
===================================================================
--- branches/mapbender_sld/http/sld/sld_function_handler.php 2007-12-18 14:35:47 UTC (rev 1930)
+++ branches/mapbender_sld/http/sld/sld_function_handler.php 2007-12-18 15:17:01 UTC (rev 1931)
@@ -96,7 +96,7 @@
db_select_db($DB,$con);
/*$sld_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<StyledLayerDescriptor version=\"1.0.0\">\n";*/
- $sld_xml = "<StyledLayerDescriptor version=\"1.0.0\">\n";
+ $sld_xml = "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\">\n";
foreach ($layer_names as $layer_name)
{
@@ -131,8 +131,9 @@
$sql = "SELECT fkey_layer_id FROM gui_layer WHERE fkey_gui_id='".$_REQUEST["gui_id"]."' AND gui_layer_wms_id=".$_REQUEST["wms_id"].";";
$res = db_query($sql);
- $sld_xml = "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\">\n";
-
+ $sld_xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+ $sld_xml .= "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\">\n";
+
while ($row = db_fetch_row($res))
{
$layer_id = $row[0];
More information about the Mapbender_commits
mailing list