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: [email protected]
For additional commands, e-mail: [email protected]