You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@locus.apache.org on 2000/06/23 19:24:56 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/validators/common SimpleContentModel.java
andyc 00/06/23 10:24:53
Modified: java/src/org/apache/xerces/validators/common
SimpleContentModel.java
Log:
Problem with the simple content model -- it would only signal
errors in simple sequences (e.g. 'a,b') when BOTH the localpart
and URI were different instead of when EITHER the localpart or
URI were different. This bug was introduced by me (oops!) when
I updated the content models to validate against namespace
information for XML Schema. Now it's fixed.
Revision Changes Path
1.4 +3 -3 xml-xerces/java/src/org/apache/xerces/validators/common/SimpleContentModel.java
Index: SimpleContentModel.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/common/SimpleContentModel.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SimpleContentModel.java 2000/05/19 02:27:20 1.3
+++ SimpleContentModel.java 2000/06/23 17:24:49 1.4
@@ -81,7 +81,7 @@
* in a simple way without a DFA and without the overhead of setting up a
* DFA for such a simple check.
*
- * @version $Id: SimpleContentModel.java,v 1.3 2000/05/19 02:27:20 andyc Exp $
+ * @version $Id: SimpleContentModel.java,v 1.4 2000/06/23 17:24:49 andyc Exp $
*/
public class SimpleContentModel
implements XMLContentModel {
@@ -276,10 +276,10 @@
// we stored, in the stored order.
//
if (length == 2) {
- if (children[offset].uri != fFirstChild.uri && children[offset].localpart != fFirstChild.localpart)
+ if (children[offset].uri != fFirstChild.uri || children[offset].localpart != fFirstChild.localpart)
return 0;
- if (children[offset + 1].uri != fSecondChild.uri && children[offset + 1].localpart != fSecondChild.localpart)
+ if (children[offset + 1].uri != fSecondChild.uri || children[offset + 1].localpart != fSecondChild.localpart)
return 1;
}
else {