You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sa...@apache.org on 2009/01/29 19:35:44 UTC

svn commit: r738952 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java

Author: sandygao
Date: Thu Jan 29 18:35:43 2009
New Revision: 738952

URL: http://svn.apache.org/viewvc?rev=738952&view=rev
Log:
When an element matches a wildcard and we continue to look for an element declaration (because wildcards are weakened in schema 1.1), we need to remember which wildcard we matched by keeping its index in the candidate list.

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=738952&r1=738951&r2=738952&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 Thu Jan 29 18:35:43 2009
@@ -334,13 +334,15 @@
         // We matched against a wildcard, but need to also check
         // if we can find a matching element declaration
         if (toMatchElementDecl) {
+            int newIndex = elemIndex;
             int newState = 0;
             Object newMatchingDecl = null;
-            while (++elemIndex < fElemMapSize) {
-                newState = fTransTable[curState][elemIndex];
-                if (newState != -1 && fElemMapType[elemIndex] == XSParticleDecl.PARTICLE_ELEMENT) {
-                    newMatchingDecl = subGroupHandler.getMatchingElemDecl(curElem, (XSElementDecl)fElemMap[elemIndex], fSchemaVersion);
+            while (++newIndex < fElemMapSize) {
+                newState = fTransTable[curState][newIndex];
+                if (newState != -1 && fElemMapType[newIndex] == XSParticleDecl.PARTICLE_ELEMENT) {
+                    newMatchingDecl = subGroupHandler.getMatchingElemDecl(curElem, (XSElementDecl)fElemMap[newIndex], fSchemaVersion);
                     if (newMatchingDecl != null) {
+                        elemIndex = newIndex;
                         matchingDecl = newMatchingDecl;
                         nextState = newState;
                         break;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org