You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2011/01/13 15:42:23 UTC

svn commit: r1058584 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl: msg/XMLSchemaMessages.properties xs/traversers/XSDComplexTypeTraverser.java

Author: knoaman
Date: Thu Jan 13 14:42:22 2011
New Revision: 1058584

URL: http://svn.apache.org/viewvc?rev=1058584&view=rev
Log:
Schema Representation Constraint: Complex Type Definition Representation OK
3. If <openContent> is present and has mode = 'none', then there must not be an <any> among the [children] of <openContent>

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
    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/msg/XMLSchemaMessages.properties
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties?rev=1058584&r1=1058583&r2=1058584&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties Thu Jan 13 14:42:22 2011
@@ -132,6 +132,7 @@
         src-ct.4 = src-ct.4: Complex Type Definition Representation Error for type ''{0}''. The intersection of wildcards is not expressible.
         src-ct.5 = src-ct.5: Complex Type Definition Representation Error for type ''{0}''. The union of wildcards is not expressible.
         src-ct.6 = src-ct.5: Complex Type Definition Representation Error for type ''{0}''. If <openContent> is present and the actual value of its mode [attribute] is not 'none', then there must be an <any> among the [children] of <openContent>.
+        src-ct11.3 = src-ct11.3: Complex Type Definition Representation Error for type ''{0}''. If <openContent> is present and has mode = 'none', then there must not be an <any> among the [children] of <openContent>.
         src-ct11.4 = src-ct11.4: Complex Type Definition Representation Error for type ''{0}''. If the <complexContent> alternative is chosen and the 'mixed' attribute is present on both <complexType> and <complexContent>, then the actual values of those attributes must be the same.
         src-element.1 = src-element.1: The properties ''default'' and ''fixed'' cannot both be present in element declaration ''{0}''. Use only one of them.
         src-element.2.1 = src-element.2.1: : One of 'ref' or 'name' must be present in a local element declaration.

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=1058584&r1=1058583&r2=1058584&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 13 14:42:22 2011
@@ -316,6 +316,10 @@ class  XSDComplexTypeTraverser extends X
             Object[] wcAttrValues = fAttrChecker.checkAttributes(child, false, schemaDoc);
             ocDecl.fWildcard = fSchemaHandler.fWildCardTraverser.traverseWildcardDecl(child, wcAttrValues, schemaDoc, grammar);
             fAttrChecker.returnAttrArray(wcAttrValues, schemaDoc);
+            if (ocMode == XSOpenContentDecl.MODE_NONE) {
+                ocDecl.fWildcard = null;
+                reportSchemaError("src-ct11.3", new Object[]{fName}, elmNode);
+            }
         }
 
         fAttrChecker.returnAttrArray(attrValues, schemaDoc);



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