You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2010/04/15 20:14:11 UTC

svn commit: r934504 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java

Author: knoaman
Date: Thu Apr 15 18:14:10 2010
New Revision: 934504

URL: http://svn.apache.org/viewvc?rev=934504&view=rev
Log:
Fix for jira bug 1443
https://issues.apache.org/jira/browse/XERCESJ-1443

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java?rev=934504&r1=934503&r2=934504&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java Thu Apr 15 18:14:10 2010
@@ -280,13 +280,16 @@ class XSDAttributeTraverser extends XSDA
             scope = XSAttributeDecl.SCOPE_GLOBAL;
         }
         else {
+            // For XML 1.0, we only store information about enclosing complex types
+            // For XML 1.1, we store information about enclosing complex types or attribute groups
             if (enclosingParent != null) {
-                if (fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1) {
+                if (enclosingParent instanceof XSComplexTypeDecl) {
+                    enclCT = (XSComplexTypeDecl) enclosingParent;
                     enclParent = enclosingParent;
                     scope = XSAttributeDecl.SCOPE_LOCAL;
                 }
-                else if (enclosingParent instanceof XSComplexTypeDecl) {
-                    enclCT = (XSComplexTypeDecl) enclosingParent;
+                else if (fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1) {
+                    enclParent = enclosingParent;
                     scope = XSAttributeDecl.SCOPE_LOCAL;
                 }
             }



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