You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mu...@apache.org on 2012/01/19 02:26:26 UTC

svn commit: r1233147 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java

Author: mukulg
Date: Thu Jan 19 01:26:26 2012
New Revision: 1233147

URL: http://svn.apache.org/viewvc?rev=1233147&view=rev
Log:
schema 1.1 commit:
prohibiting the attributes "minOccurs" and "maxOccurs" to appear on an <any> wild-card if it exists within <openContent> or <defaultOpenContent>. this is as per the "schema for schema" for XSD 1.1.

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java?rev=1233147&r1=1233146&r2=1233147&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java Thu Jan 19 01:26:26 2012
@@ -318,6 +318,13 @@ class  XSDComplexTypeTraverser extends X
                 fAttrChecker.returnAttrArray(attrValues, schemaDoc);
                 return ocDecl;
             }
+            Attr anyWcMinOccurs = child.getAttributeNode(SchemaSymbols.ATT_MINOCCURS);
+            Attr anyWcMaxOccurs = child.getAttributeNode(SchemaSymbols.ATT_MAXOCCURS);
+            if (anyWcMinOccurs != null || anyWcMaxOccurs != null) {
+                // prohibit the attributes "minOccurs" and "maxOccurs" to appear on an <any> wild-card if it exists within <openContent> or <defaultOpenContent>
+                // REVISIT...
+                reportSchemaError("s4s-att-not-allowed", new Object[]{elmNode.getLocalName()+"=>"+SchemaSymbols.ELT_ANY, SchemaSymbols.ATT_MINOCCURS+"|"+SchemaSymbols.ATT_MAXOCCURS}, child); 
+            }
             Object[] wcAttrValues = fAttrChecker.checkAttributes(child, false, schemaDoc);
             ocDecl.fWildcard = fSchemaHandler.fWildCardTraverser.traverseWildcardDecl(child, wcAttrValues, schemaDoc, grammar);
             fAttrChecker.returnAttrArray(wcAttrValues, schemaDoc);



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