You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2006/08/30 04:44:26 UTC

svn commit: r438325 - /webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/impl/SimpleResourcePropertyCollection.java

Author: danj
Date: Tue Aug 29 19:44:25 2006
New Revision: 438325

URL: http://svn.apache.org/viewvc?rev=438325&view=rev
Log:
Updated check for nillable elements to include text under the element, in addition to children and attributes.

Modified:
    webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/impl/SimpleResourcePropertyCollection.java

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/impl/SimpleResourcePropertyCollection.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/impl/SimpleResourcePropertyCollection.java?rev=438325&r1=438324&r2=438325&view=diff
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/impl/SimpleResourcePropertyCollection.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/impl/SimpleResourcePropertyCollection.java Tue Aug 29 19:44:25 2006
@@ -1187,9 +1187,19 @@
             String message = _MESSAGES.get("NotNillable", new Object[]{ qname });
             
             if (!isNillable)
+            {
                 for (int n = 0; n < instances.length; ++n)
-                    if (!instances[n].hasChildNodes() && !instances[n].hasAttributes())
+                {
+                    //
+                    // check for child elements, attributes, and text, all of 
+                    // which qualify an element as "not null"
+                    //
+                    if (!instances[n].hasChildNodes() && 
+                        !instances[n].hasAttributes() && 
+                        XmlUtils.extractText(instances[n]) == null)
                         throw new SchemaValidationFault(message);
+                }
+            }
         }
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org