Author: sandygao
Date: Fri Nov 5 19:32:22 2010
New Revision: 1031740
URL: http://svn.apache.org/viewvc?rev=1031740&view=rev
Log:
Bug fix: wildcard intersection. Was using logic "or" when "and" should be used.
The intention is clear from the quoted spec clauses right above the check.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java?rev=1031740&r1=1031739&r2=1031740&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java
Fri Nov 5 19:32:22 2010
@@ -225,12 +225,12 @@ class XS11Constraints extends XSConstrai
intersectWildcard.fNamespaceList = localWildcard.fNamespaceList;
}
// 3 O, O1, and O2 all have {variety} = enumeration, and the
{namespaces} of O is the intersection of the {namespaces} of O1 and O2.
- else if (wildcard.fType == XSWildcardDecl.NSCONSTRAINT_LIST ||
otherWildcard.fType == XSWildcardDecl.NSCONSTRAINT_LIST) {
+ else if (wildcard.fType == XSWildcardDecl.NSCONSTRAINT_LIST &&
otherWildcard.fType == XSWildcardDecl.NSCONSTRAINT_LIST) {
intersectWildcard.fType = XSWildcardDecl.NSCONSTRAINT_LIST;
intersectWildcard.fNamespaceList =
intersect2sets(wildcard.fNamespaceList, otherWildcard.fNamespaceList);
}
// 4 O, O1, and O2 all have {variety} not, and the {namespaces} of O
is the union of the {namespaces} of O1 and O2.
- else if (wildcard.fType == XSWildcardDecl.NSCONSTRAINT_NOT ||
otherWildcard.fType == XSWildcardDecl.NSCONSTRAINT_NOT) {
+ else if (wildcard.fType == XSWildcardDecl.NSCONSTRAINT_NOT &&
otherWildcard.fType == XSWildcardDecl.NSCONSTRAINT_NOT) {
intersectWildcard.fType = XSWildcardDecl.NSCONSTRAINT_NOT;
intersectWildcard.fNamespaceList =
union2sets(wildcard.fNamespaceList, otherWildcard.fNamespaceList);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]