geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r516025 - in /geronimo/xbean/trunk: pom.xml xbean-spring/src/main/java/org/apache/xbean/spring/context/v2c/XBeanNamespaceHandler.java xbean-spring/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml
Date Thu, 08 Mar 2007 12:36:12 GMT
Author: gnodet
Date: Thu Mar  8 04:36:11 2007
New Revision: 516025

URL: http://svn.apache.org/viewvc?view=rev&rev=516025
Log:
XBEAN-81: xbean-spring fails with spring 2.0.2

Modified:
    geronimo/xbean/trunk/pom.xml
    geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/v2c/XBeanNamespaceHandler.java
    geronimo/xbean/trunk/xbean-spring/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml

Modified: geronimo/xbean/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/pom.xml?view=diff&rev=516025&r1=516024&r2=516025
==============================================================================
--- geronimo/xbean/trunk/pom.xml (original)
+++ geronimo/xbean/trunk/pom.xml Thu Mar  8 04:36:11 2007
@@ -201,7 +201,7 @@
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring</artifactId>
-                <version>2.0.1</version>
+                <version>2.0.2</version>
             </dependency>
             
             <dependency>

Modified: geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/v2c/XBeanNamespaceHandler.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/v2c/XBeanNamespaceHandler.java?view=diff&rev=516025&r1=516024&r2=516025
==============================================================================
--- geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/v2c/XBeanNamespaceHandler.java
(original)
+++ geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/v2c/XBeanNamespaceHandler.java
Thu Mar  8 04:36:11 2007
@@ -34,6 +34,8 @@
 import java.util.Properties;
 import java.util.Set;
 
+import javax.xml.XMLConstants;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.xbean.spring.context.impl.MappingMetaData;
@@ -161,6 +163,9 @@
     }
 
     public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext
parserContext) {
+        if (node instanceof org.w3c.dom.Attr && XMLConstants.XMLNS_ATTRIBUTE.equals(node.getLocalName()))
{
+            return definition; // Ignore xmlns="xxx" attributes
+        }
         throw new IllegalArgumentException("Cannot locate BeanDefinitionDecorator for "
                         + (node instanceof Element ? "element" : "attribute") + " [" +
                         node.getLocalName() + "].");

Modified: geronimo/xbean/trunk/xbean-spring/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml?view=diff&rev=516025&r1=516024&r2=516025
==============================================================================
--- geronimo/xbean/trunk/xbean-spring/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml
(original)
+++ geronimo/xbean/trunk/xbean-spring/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml
Thu Mar  8 04:36:11 2007
@@ -24,7 +24,7 @@
               serviceName="foo:xyz">
     <dinnerMenu>
       <pizza myTopping="Ham" cheese="Mozzarella" size="15"/>
-      <bean xmlns="http://xbean.apache.org/schemas/spring/1.0" class="org.apache.xbean.spring.example.PizzaService">
+      <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.xbean.spring.example.PizzaService">
         <property name="topping" value="Eggs"/>
         <property name="cheese" value="Mozzarella"/>
         <property name="size" value="16"/>



Mime
View raw message