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 2006/09/08 10:56:24 UTC

svn commit: r441442 - /xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java

Author: cam
Date: Fri Sep  8 01:56:23 2006
New Revision: 441442

URL: http://svn.apache.org/viewvc?view=rev&rev=441442
Log:
1. Make SVG 1.2 documents create appropriate DOM objects for extension
   elements.

Modified:
    xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java?view=diff&rev=441442&r1=441441&r2=441442
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java Fri Sep  8 01:56:23 2006
@@ -113,19 +113,27 @@
             return new GenericElement(qualifiedName.intern(), document);
 
         String name = DOMUtilities.getLocalName(qualifiedName);
+        String prefix = DOMUtilities.getPrefix(qualifiedName);
         if (SVG12Constants.SVG_NAMESPACE_URI.equals(namespaceURI)) {
             ElementFactory ef = (ElementFactory)factories.get(name);
-            if (ef != null)
-                return ef.create(DOMUtilities.getPrefix(qualifiedName),
-                                 document);
+            if (ef != null) {
+                return ef.create(prefix, document);
+            }
         } else if (XBLConstants.XBL_NAMESPACE_URI.equals(namespaceURI)) {
             ElementFactory ef = (ElementFactory)xblFactories.get(name);
-            if (ef != null)
-                return ef.create(DOMUtilities.getPrefix(qualifiedName),
-                                 document);
+            if (ef != null) {
+                return ef.create(prefix, document);
+            }
+        }
+
+        if (customFactories != null) {
+            ElementFactory cef;
+            cef = (ElementFactory)customFactories.get(namespaceURI, name);
+            if (cef != null) {
+                return cef.create(prefix, document);
+            }
         }
 
-        String prefix = DOMUtilities.getPrefix(qualifiedName);
         return new BindableElement(prefix, document, namespaceURI, name);
     }