[OpenLayers-Commits] r5109 - sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format

commits at openlayers.org commits at openlayers.org
Sat Nov 3 18:04:11 EDT 2007


Author: ahocevar
Date: 2007-11-03 18:04:09 -0400 (Sat, 03 Nov 2007)
New Revision: 5109

Modified:
   sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format/SLD.js
Log:
replaced Util.getXmlNodeValue with more appropriate functions

Modified: sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format/SLD.js
===================================================================
--- sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format/SLD.js	2007-11-03 16:56:08 UTC (rev 5108)
+++ sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format/SLD.js	2007-11-03 22:04:09 UTC (rev 5109)
@@ -150,7 +150,7 @@
                 this.sldns, "MinScaleDenominator");
         if (minScale && minScale.length > 0) {
             rule.minScaleDenominator = parseFloat(
-                    OpenLayers.Util.getXmlNodeValue(minScale[0]));
+                    this.getChildValue(minScale[0]));
         }
         
         // MaxScaleDenominator
@@ -158,7 +158,7 @@
                 this.sldns, "MaxScaleDenominator");
         if (maxScale && maxScale.length > 0) {
             rule.maxScaleDenominator = parseFloat(
-                    OpenLayers.Util.getXmlNodeValue(maxScale[0]));
+                    this.getChildValue(maxScale[0]));
         }
         
         // STYLES
@@ -381,7 +381,8 @@
             if (attributeName && attributeValue) {
                 propertyNode = this.getNodeWithAttribute(propertyNodeList,
                         attributeName, attributeValue);
-                result = OpenLayers.Util.getXmlNodeValue(propertyNode);
+                result = propertyNode ?
+                        propertyNode.text || propertyNode.textContent : null;
             }
 
             // get the attribute value and use it as result
@@ -396,7 +397,7 @@
                 // get the property value from the textContent of the first
                 // node
                 propertyNode = propertyNodeList[0];
-                result = OpenLayers.Util.getXmlNodeValue(propertyNode);
+                result = propertyNode.text || propertyNode.textContent;
 
                 // get the property value from an ogc:Literal at the level of
                 // the property node.



More information about the Commits mailing list