Author: sandygao
Date: Fri Nov 5 19:56:30 2010
New Revision: 1031754
URL: http://svn.apache.org/viewvc?rev=1031754&view=rev
Log:
Bug fix: in checking wildcard-wildcard collision in UPA, the schema 1.1 path
was incorrect. Fixed it to align with the 1.0 path. Now since they are the
same, moved the overlapUAP() method back to the base class.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS10Constraints.java
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSConstraints.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS10Constraints.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS10Constraints.java?rev=1031754&r1=1031753&r2=1031754&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS10Constraints.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS10Constraints.java
Fri Nov 5 19:56:30 2010
@@ -61,19 +61,6 @@ class XS10Constraints extends XSConstrai
return false;
}
- public boolean overlapUPA(XSWildcardDecl wildcard1,
- XSWildcardDecl wildcard2) {
- // if the intersection of the two wildcard is not empty list
- XSWildcardDecl intersect = performIntersectionWith(wildcard1,
wildcard2, wildcard1.fProcessContents);
- if (intersect == null ||
- intersect.fType != XSWildcardDecl.NSCONSTRAINT_LIST ||
- intersect.fNamespaceList.length != 0) {
- return true;
- }
-
- return false;
- }
-
/**
* Schema Component Constraint: Wildcard Subset
*
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=1031754&r1=1031753&r2=1031754&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:56:30 2010
@@ -47,21 +47,6 @@ class XS11Constraints extends XSConstrai
return false;
}
- public boolean overlapUPA(XSWildcardDecl wildcard1,
- XSWildcardDecl wildcard2) {
- // if the intersection of the two wildcards is not any and
- // and the {namespaces} of such intersection is not the empty set
- // TODO: is this correct? No overlap if the intersection is "any"?
- // TODO: should this be different between 1.0 and 1.1?
- XSWildcardDecl intersect = performIntersectionWith(wildcard1,
wildcard2, wildcard1.fProcessContents);
- if (intersect.fType != XSWildcardDecl.NSCONSTRAINT_ANY &&
- intersect.fNamespaceList.length != 0) {
- return true;
- }
-
- return false;
- }
-
/**
* Schema Component Constraint: Wildcard Subset
*/
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSConstraints.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSConstraints.java?rev=1031754&r1=1031753&r2=1031754&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSConstraints.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSConstraints.java
Fri Nov 5 19:56:30 2010
@@ -587,6 +587,20 @@ public abstract class XSConstraints {
return false;
}
+ public boolean overlapUPA(XSWildcardDecl wildcard1,
+ XSWildcardDecl wildcard2) {
+ // if the intersection of the two wildcards is not any and
+ // and the {namespaces} of such intersection is not the empty set
+ XSWildcardDecl intersect = performIntersectionWith(wildcard1,
wildcard2, wildcard1.fProcessContents);
+ if (intersect == null ||
+ intersect.fType != XSWildcardDecl.NSCONSTRAINT_LIST ||
+ intersect.fNamespaceList.length != 0) {
+ return true;
+ }
+
+ return false;
+ }
+
// call one of the above methods according to the type of decls
public boolean overlapUPA(Object decl1, Object decl2,
SubstitutionGroupHandler sgHandler) {
@@ -722,9 +736,6 @@ public abstract class XSConstraints {
XSWildcardDecl wildcard,
SubstitutionGroupHandler sgHandler);
- public abstract boolean overlapUPA(XSWildcardDecl wildcard1,
- XSWildcardDecl wildcard2);
-
protected abstract void groupSubsumption(XSParticleDecl dParticle,
XSParticleDecl bParticle,
XSGrammarBucket grammarBucket, SubstitutionGroupHandler SGHandler,
CMBuilder cmBuilder, XMLErrorReporter errorReporter, String dName,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]