[Mapbender-commits] r1932 - branches/mapbender_sld/http/sld/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Dec 18 10:17:38 EST 2007
Author: mschulz
Date: 2007-12-18 10:17:38 -0500 (Tue, 18 Dec 2007)
New Revision: 1932
Modified:
branches/mapbender_sld/http/sld/classes/AddOperationModule.php
branches/mapbender_sld/http/sld/classes/BinaryComparisonOp.php
branches/mapbender_sld/http/sld/classes/BinaryLogicOp.php
branches/mapbender_sld/http/sld/classes/StyledLayerDescriptor.php
Log:
use ogc: namespace for filter element
Modified: branches/mapbender_sld/http/sld/classes/AddOperationModule.php
===================================================================
--- branches/mapbender_sld/http/sld/classes/AddOperationModule.php 2007-12-18 15:17:01 UTC (rev 1931)
+++ branches/mapbender_sld/http/sld/classes/AddOperationModule.php 2007-12-18 15:17:38 UTC (rev 1932)
@@ -58,15 +58,15 @@
$temp .= $offset." <option value=\"and\">AND - logisches UND</option>\n";
$temp .= $offset." <option value=\"or\">OR - logisches ODER</option>\n";
$temp .= $offset." <option value=\"not\">NOT - logisches NICHT</option>\n";
- $temp .= $offset." <option value=\"ogc:propertyisequalto\">Eigenschaft = x</option>\n";
- $temp .= $offset." <option value=\"ogc:propertyisnotequalto\">Eigenschaft != x</option>\n";
- $temp .= $offset." <option value=\"ogc:propertyisgreaterthan\">Eigenschaft > x</option>\n";
- $temp .= $offset." <option value=\"ogc:propertyisgreaterthanorequalto\">Eigenschaft >= x</option>\n";
- $temp .= $offset." <option value=\"ogc:propertyislessthan\">Eigenschaft < x</option>\n";
- $temp .= $offset." <option value=\"ogc:propertyislessthanorequalto\">Eigenschaft <= x</option>\n";
- $temp .= $offset." <option value=\"ogc:propertyislike\">Eigenschaft �hnlich x</option>\n";
- $temp .= $offset." <option value=\"ogc:propertyisnull\">Eigenschaft nicht definiert</option>\n";
- $temp .= $offset." <option value=\"ogc:propertyisbetween\">x <= Eigenschaft <= y</option>\n";
+ $temp .= $offset." <option value=\"propertyisequalto\">Eigenschaft = x</option>\n";
+ $temp .= $offset." <option value=\"propertyisnotequalto\">Eigenschaft != x</option>\n";
+ $temp .= $offset." <option value=\"propertyisgreaterthan\">Eigenschaft > x</option>\n";
+ $temp .= $offset." <option value=\"propertyisgreaterthanorequalto\">Eigenschaft >= x</option>\n";
+ $temp .= $offset." <option value=\"propertyislessthan\">Eigenschaft < x</option>\n";
+ $temp .= $offset." <option value=\"propertyislessthanorequalto\">Eigenschaft <= x</option>\n";
+ $temp .= $offset." <option value=\"propertyislike\">Eigenschaft �hnlich x</option>\n";
+ $temp .= $offset." <option value=\"propertyisnull\">Eigenschaft nicht definiert</option>\n";
+ $temp .= $offset." <option value=\"propertyisbetween\">x <= Eigenschaft <= y</option>\n";
$temp .= $offset."</select>\n";
$temp .= $offset."<span class=\"edit hand\"";
$temp .= " onClick=\"url='?function=addoperation&id=".$this->objId."&operation=';";
Modified: branches/mapbender_sld/http/sld/classes/BinaryComparisonOp.php
===================================================================
--- branches/mapbender_sld/http/sld/classes/BinaryComparisonOp.php 2007-12-18 15:17:01 UTC (rev 1931)
+++ branches/mapbender_sld/http/sld/classes/BinaryComparisonOp.php 2007-12-18 15:17:38 UTC (rev 1932)
@@ -73,10 +73,10 @@
*/
function generateXml($offset = "")
{
- $temp = $offset."<".$this->name.">\n";
+ $temp = $offset."<ogc:".$this->name.">\n";
$temp .= $offset. " <ogc:PropertyName>".$this->ogcPropertyName."</ogc:PropertyName>\n";
$temp .= $offset. " <ogc:Literal>".$this->ogcLiteral."</ogc:Literal>\n";
- $temp .= $offset."</".$this->name.">\n";
+ $temp .= $offset."</ogc:".$this->name.">\n";
return $temp;
}
@@ -110,12 +110,12 @@
switch($this->name)
{
- case "ogc:PropertyIsEqualTo": $temp .= "="; break;
- case "ogc:PropertyIsNotEqualTo": $temp .= "!="; break;
- case "ogc:PropertyIsGreaterThan": $temp .= ">"; break;
- case "ogc:PropertyIsGreaterThanOrEqualTo": $temp .= ">="; break;
- case "ogc:PropertyIsLessThan": $temp .= "<"; break;
- case "ogc:PropertyIsLessThanOrEqualTo": $temp .= "<="; break;
+ case "PropertyIsEqualTo": $temp .= "="; break;
+ case "PropertyIsNotEqualTo": $temp .= "!="; break;
+ case "PropertyIsGreaterThan": $temp .= ">"; break;
+ case "PropertyIsGreaterThanOrEqualTo": $temp .= ">="; break;
+ case "PropertyIsLessThan": $temp .= "<"; break;
+ case "PropertyIsLessThanOrEqualTo": $temp .= "<="; break;
default: $temp .= $this->name;
}
$temp .= "\n";
Modified: branches/mapbender_sld/http/sld/classes/BinaryLogicOp.php
===================================================================
--- branches/mapbender_sld/http/sld/classes/BinaryLogicOp.php 2007-12-18 15:17:01 UTC (rev 1931)
+++ branches/mapbender_sld/http/sld/classes/BinaryLogicOp.php 2007-12-18 15:17:38 UTC (rev 1932)
@@ -73,12 +73,12 @@
*/
function generateXml($offset = "")
{
- $temp = $offset."<".$this->name.">\n";
+ $temp = $offset."<ogc:".$this->name.">\n";
foreach($this->operations as $operation)
{
$temp .= $operation->generateXml($offset." ");
}
- $temp .= $offset."</".$this->name.">\n";
+ $temp .= $offset."</ogc:".$this->name.">\n";
return $temp;
}
@@ -129,17 +129,18 @@
//Only 2 Operations
- if (count($this->operations) < 2)
- {
- $temp .= $offset."<tr>\n";
- $temp .= $offset." <td colspan=\"4\">\n";
+ //if (count($this->operations) < 2)
+ // why should there be only 2 operations? Nothing in the specs ...
+
+ $temp .= $offset."<tr>\n";
+ $temp .= $offset." <td colspan=\"4\">\n";
- $addOperationModule = new AddOperationModule($this->id, $id);
- $temp .= $addOperationModule->generateHtmlForm($offset." ");
+ $addOperationModule = new AddOperationModule($this->id, $id);
+ $temp .= $addOperationModule->generateHtmlForm($offset." ");
- $temp .= $offset." </td>\n";
- $temp .= $offset."</tr>\n";
- }
+ $temp .= $offset." </td>\n";
+ $temp .= $offset."</tr>\n";
+
$temp .= $offset." </table>\n";
$temp .= $offset." </td>\n";
Modified: branches/mapbender_sld/http/sld/classes/StyledLayerDescriptor.php
===================================================================
--- branches/mapbender_sld/http/sld/classes/StyledLayerDescriptor.php 2007-12-18 15:17:01 UTC (rev 1931)
+++ branches/mapbender_sld/http/sld/classes/StyledLayerDescriptor.php 2007-12-18 15:17:38 UTC (rev 1932)
@@ -83,13 +83,14 @@
*/
function generateXml($offset = "")
{
- $temp = $offset."<StyledLayerDescriptor";
+ $temp = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+ $temp .= $offset."<StyledLayerDescriptor";
if ($this->version != "") $temp .= " version=\"".htmlspecialchars($this->version)."\"";
- #$temp .= "xsi:schemaLocation=\"http://www.opengis.net/sld StyledLayerDescriptor.xsd\" \
- #xmlns=\"http://www.opengis.net/sld\" \
- #xmlns:ogc=\"http://www.opengis.net/ogc\" \
- #xmlns:xlink=\"http://www.w3.org/1999/xlink\" \
- #xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
+ $temp .= " xsi:schemaLocation=\"http://www.opengis.net/sld StyledLayerDescriptor.xsd\"";
+ $temp .= " xmlns=\"http://www.opengis.net/sld\"";
+ $temp .= " xmlns:ogc=\"http://www.opengis.net/ogc\"";
+ $temp .= " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
+ $temp .= " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
$temp .= ">\n";
if ($this->name != "") $temp .= $offset." <Name>".htmlspecialchars($this->name)."</Name>\n";
if ($this->title != "") $temp .= $offset." <Title>".htmlspecialchars($this->title)."</Title>\n";
More information about the Mapbender_commits
mailing list