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 2009/01/20 20:21:03 UTC

svn commit: r736072 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers: XSDHandler.java XSDocumentInfo.java

Author: knoaman
Date: Tue Jan 20 11:21:02 2009
New Revision: 736072

URL: http://svn.apache.org/viewvc?rev=736072&view=rev
Log:
Fix for defaultAttributes

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

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=736072&r1=736071&r2=736072&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Tue Jan 20 11:21:02 2009
@@ -1232,7 +1232,7 @@
             // if XML Schema 1.1, set default attribute group 
             if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1) {
                 // Check that we have a 'defaultAttributes' and that we have not already processed it
-                if (currSchemaDoc.fDefaultAttributes != null && currSchemaDoc.fDefaultAGroup != null) {
+                if (currSchemaDoc.fDefaultAttributes != null && currSchemaDoc.fDefaultAGroup == null) {
                     currSchemaDoc.fDefaultAGroup = (XSAttributeGroupDecl) getGlobalDecl(
                             currSchemaDoc, XSDHandler.ATTRIBUTEGROUP_TYPE, currSchemaDoc.fDefaultAttributes, currRoot);
                 }

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java?rev=736072&r1=736071&r2=736072&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java Tue Jan 20 11:21:02 2009
@@ -110,6 +110,11 @@
 
         if (schemaRoot != null) {
             Element root = schemaRoot;
+            
+            // set namespace support
+            fValidationContext.setNamespaceSupport(fNamespaceSupport);
+            fValidationContext.setSymbolTable(symbolTable);
+            
             fSchemaAttrs = attrChecker.checkAttributes(root, true, this);
             // schemaAttrs == null means it's not an <xsd:schema> element
             // throw an exception, but we don't know the document systemId,
@@ -132,11 +137,12 @@
 
             fNamespaceSupportRoot = new SchemaNamespaceSupport(fNamespaceSupport);
 
-            fDefaultAttributes = (QName) fSchemaAttrs[XSAttributeChecker.ATTIDX_DEFAULTATTRAPPLY];
+            fDefaultAttributes = (QName) fSchemaAttrs[XSAttributeChecker.ATTIDX_DEFAULTATTRIBUTES];
 
             //set namespace support
-            fValidationContext.setNamespaceSupport(fNamespaceSupport);
-            fValidationContext.setSymbolTable(symbolTable);
+            //fValidationContext.setNamespaceSupport(fNamespaceSupport);
+            //fValidationContext.setSymbolTable(symbolTable);
+            
             // pass null as the schema document, so that the namespace
             // context is not popped.
 



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