         var maxOccurs:uint = getMaxOccurs(definition);
         var minOccurs:uint = getMinOccurs(definition);
 
+        // If the maximum occurence is 0 this element must not be present.
+        if (maxOccurs == 0)
+            return true;
+
         isRequired = isRequired && minOccurs > 0;
 
         // <element ref="..."> may be used to point to a top-level element definition

            return true;
        }


        
        
        // We treat maxOccurs="1" as a special case and not check the
        // occurence because we need to pass through values to SOAP
        // encoded Arrays which do not rely on minOccurs/maxOccurs

            if (encodedElement != null)
                appendValue(siblings, encodedElement);

            // If we found our element by reference, we now release the schema scope
            if (ref != null)
                schemaManager.releaseScope();

            // if required, but no value was encoded, the definition is not
            // satisfied
            if (isRequired  && encodedElement == null)
