Fixing JIRA Issue #1492: https://issues.apache.org/jira/browse/XERCESJ-1492. checking of maxOccurs was broken. We 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.
Fixing JIRA Issue #1492: https://issues.apache.org/jira/browse/XERCESJ-1492. checking of maxOccurs was broken. We 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.

git-svn-id: 39602be06c88ea89c23a8a9fd3d1314146990de6@1062852 13f79535-47bb-0310-9956-ffa450edef68

RackerWilliams/xercesj,RackerWilliams/xercesj,RackerWilliams/xercesj