geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1393335 - in /geronimo/xbean/trunk: xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/XsdGenerator.java xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java
Date Wed, 03 Oct 2012 08:15:10 GMT
Author: gnodet
Date: Wed Oct  3 08:15:10 2012
New Revision: 1393335

URL: http://svn.apache.org/viewvc?rev=1393335&view=rev
Log:
[XBEAN-146] xsd for list elements should be unbounded, not max=1

Modified:
    geronimo/xbean/trunk/xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/XsdGenerator.java
    geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java

Modified: geronimo/xbean/trunk/xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/XsdGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/XsdGenerator.java?rev=1393335&r1=1393334&r2=1393335&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/XsdGenerator.java
(original)
+++ geronimo/xbean/trunk/xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/XsdGenerator.java
Wed Oct  3 08:15:10 2012
@@ -182,7 +182,7 @@ public class XsdGenerator implements Gen
         }
         String maxOccurs = type.isCollection() || "java.util.Map".equals(type.getName())
? "unbounded" : "1";
 
-        out.println("        <xs:element name='" + attributeMapping.getAttributeName()
+ "' minOccurs='0' maxOccurs='1'>");
+        out.println("        <xs:element name='" + attributeMapping.getAttributeName()
+ "' minOccurs='0' maxOccurs='" + maxOccurs + "'>");
         if (!isEmptyString(attributeMapping.getDescription())) {
             out.println("          <xs:annotation>");
             out.println("            <xs:documentation><![CDATA[");

Modified: geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java?rev=1393335&r1=1393334&r2=1393335&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java
(original)
+++ geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/generator/XsdGenerator.java
Wed Oct  3 08:15:10 2012
@@ -195,7 +195,7 @@ public class XsdGenerator implements Gen
         }
         String maxOccurs = type.isCollection() || "java.util.Map".equals(type.getName())
? "unbounded" : "1";
 
-        out.println("        <xs:element name='" + attributeMapping.getAttributeName()
+ "' minOccurs='0' maxOccurs='1'>");
+        out.println("        <xs:element name='" + attributeMapping.getAttributeName()
+ "' minOccurs='0' maxOccurs='" + maxOccurs + "'>");
         if (!isEmptyString(attributeMapping.getDescription())) {
             out.println("          <xs:annotation>");
             out.println("            <xs:documentation><![CDATA[");



Mime
View raw message