[OpenLayers-Commits] r5112 - sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format
commits at openlayers.org
commits at openlayers.org
Sun Nov 4 16:05:22 EST 2007
Author: ahocevar
Date: 2007-11-04 16:05:21 -0500 (Sun, 04 Nov 2007)
New Revision: 5112
Modified:
sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format/SLD.js
Log:
fixes to make SLD parsing work in Opera
Modified: sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format/SLD.js
===================================================================
--- sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format/SLD.js 2007-11-03 22:44:15 UTC (rev 5111)
+++ sandbox/ahocevar/sldRenderer/lib/OpenLayers/Format/SLD.js 2007-11-04 21:05:21 UTC (rev 5112)
@@ -376,6 +376,14 @@
attributeName) :
propertyNodeList[0];
+ // strip namespace from attribute name for Opera browsers
+ if (window.opera && attributeName) {
+ var nsDelimiterPos = attributeName.indexOf(":");
+ if (nsDelimiterPos != -1) {
+ attributeName = attributeName.substring(++nsDelimiterPos);
+ }
+ }
+
// get the property value from the node matching attributeName
// and attributeValue
if (attributeName && attributeValue) {
More information about the Commits
mailing list