You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2011/01/24 17:05:28 UTC
svn commit: r1062852 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java
Author: mrglavas
Date: Mon Jan 24 16:05:28 2011
New Revision: 1062852
URL: http://svn.apache.org/viewvc?rev=1062852&view=rev
Log:
Fixing a bug in the checking of maxOccurs. Need to increment the elemIndex before entering the loop in findMatchingDecl() so that we don't match the same declaration again. This caused Xerces to accept more instances of an element than were allowed by maxOccurs.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java?rev=1062852&r1=1062851&r2=1062852&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java Mon Jan 24 16:05:28 2011
@@ -357,7 +357,7 @@ public class XSDFACM
// we've already seen enough instances of the first "foo" perhaps there is
// another element declaration or wildcard deeper in the element map which
// matches.
- return findMatchingDecl(curElem, state, subGroupHandler, elemIndex, eDeclHelper);
+ return findMatchingDecl(curElem, state, subGroupHandler, ++elemIndex, eDeclHelper);
}
}
else if (state[2] < o.minOccurs) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org