Author: mukulg
Date: Wed Feb 9 07:29:33 2011
New Revision: 1068771
URL: http://svn.apache.org/viewvc?rev=1068771&view=rev
Log:
XML Schema 1.1 requires that while doing complex type restriction, the
attribute use in derived and base type must have same value of inheritable
flag. This commit makes this improvement.
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/XSAttributeGroupDecl.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=1068771&r1=1068770&r2=1068771&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
Wed Feb 9 07:29:33 2011
@@ -202,7 +202,8 @@
cos-ct-extends.1.4.3.2.2.1.b = cos-ct-extends.1.4.3.2.2.1.b: The
content type of a derived type and that of its base must both be mixed or both
be element-only. Type ''{0}'' is mixed, but its base type is not.
cos-ct-extends.1.4.3.2.2.3 = cos-ct-extends.1.4.3.2.2.3: The open
content of the base type is not absent and the content type of the derived type
must have a ''suffix'' or ''interleave'' mode. Type ''{0}'' has an open content
with a ''none'' mode.
cos-ct-extends.1.4.3.2.2.3.3 = cos-ct-extends.1.4.3.2.2.3.3: The open
content of a derived type and that of its base must both have a ''suffix''
mode. Type ''{0}'' has an open content with a ''suffix'' mode, but its base
type is not.
- cos-ct-extends.1.4.3.2.2.3.4 = cos-ct-extends.1.4.3.2.2.3.4: The
namespace constraint of the wildcard on the open content of the base type must
be a subset of the namespace constraint of the wildcard on the open content of
the derived type. This is not the case for type ''{0}''.
+ cos-ct-extends.1.4.3.2.2.3.4 = cos-ct-extends.1.4.3.2.2.3.4: The
namespace constraint of the wildcard on the open content of the base type must
be a subset of the namespace constraint of the wildcard on the open content of
the derived type. This is not the case for type ''{0}''.
+ cos-content-act-restrict.5.3 = cos-content-act-restrict.5.3: Error for
type ''{0}''. The attribute use ''{1}'' in this type has value of
''inheritable'', which is inconsistent with the value in the base type.
cos-element-consistent = cos-element-consistent: Error for type
''{0}''. Multiple elements with name ''{1}'', with different types, appear in
the model group.
cos-list-of-atomic = cos-list-of-atomic: In the definition of list
type ''{0}'', type ''{1}'' is an invalid list element type because it is not
atomic (''{1}'' is either a list type, or a union type which contains a list).
cos-nonambig = cos-nonambig: {0} and {1} (or elements from their
substitution group) violate \"Unique Particle Attribution\". During validation
against this schema, ambiguity would be created for those two particles.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java?rev=1068771&r1=1068770&r2=1068771&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java
Wed Feb 9 07:29:33 2011
@@ -267,6 +267,11 @@ public class XSAttributeGroupDecl implem
}
}
+
+ if (baseAttrUse.getInheritable() != attrUse.getInheritable()) {
+ errorArgs = new Object[]{typeName, attrDecl.fName,
"cos-content-act-restrict.5.3"};
+ return errorArgs;
+ }
} else {
// No matching attribute in base - there should be a matching
wildcard
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]