You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2007/09/24 13:03:52 UTC

svn commit: r578755 - /xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGStylableElement.java

Author: cam
Date: Mon Sep 24 04:03:43 2007
New Revision: 578755

URL: http://svn.apache.org/viewvc?rev=578755&view=rev
Log:
Make SVGStylable.getPresentationAttribute() return null if the given
presentation attribute is not specified on the element.

Modified:
    xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGStylableElement.java

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGStylableElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGStylableElement.java?rev=578755&r1=578754&r2=578755&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGStylableElement.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGStylableElement.java Mon Sep 24 04:03:43 2007
@@ -18,9 +18,6 @@
  */
 package org.apache.batik.dom.svg;
 
-import java.net.MalformedURLException;
-import java.net.URL;
-
 import org.apache.batik.dom.anim.AnimationTargetListener;
 import org.apache.batik.dom.util.DoublyIndexedTable;
 import org.apache.batik.anim.values.AnimatableValue;
@@ -301,6 +298,9 @@
             }
         }
         putLiveAttributeValue(null, name, (LiveAttributeValue)result);
+        if (getAttributeNS(null, name).length() == 0) {
+            return null;
+        }
         return result;
     }