Author: sandygao
Date: Fri Nov 5 19:30:05 2010
New Revision: 1031737
URL: http://svn.apache.org/viewvc?rev=1031737&view=rev
Log:
Bug fix: wildcard subset checking in schema 1.1 wasn't working properly when
sub is "any" and base is not "any". Was returning "yes, sub is a subset of
super" when it shouldn't.
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=1031737&r1=1031736&r2=1031737&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:30:05 2010
@@ -90,11 +90,15 @@ class XS11Constraints extends XSConstrai
}
// 4 Both sub and super have {variety} = not, and super's
{namespaces} is a subset of sub's {namespaces}.
- if (wildcard.fType == XSWildcardDecl.NSCONSTRAINT_NOT) {
+ else if (wildcard.fType == XSWildcardDecl.NSCONSTRAINT_NOT) {
if (superWildcard.fType != XSWildcardDecl.NSCONSTRAINT_NOT ||
!subset2sets(superWildcard.fNamespaceList, wildcard.fNamespaceList)) {
return false;
}
}
+ else {
+ // Sub is any super is not. Not a subset.
+ return false;
+ }
}
// And all of the following must be true:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]