Author: mrglavas
Date: Sun Dec  7 12:51:25 2008
New Revision: 724200

URL: http://svn.apache.org/viewvc?rev=724200&view=rev
Log:
The 'root-element-declaration' property has higher precedence 
than the 'root-type-definition' property. If both are set the
specified element declaration should be used.

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

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=724200&r1=724199&r2=724200&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
 Sun Dec  7 12:51:25 2008
@@ -2003,20 +2003,20 @@
         }
         
         if (fElementDepth == 0) {
-            // 1.2.1.1 A type definition was stipulated by the processor
-            if (fRootTypeDefinition != null) {
-                fCurrentType = fRootTypeDefinition;
-            }
-            else if (fRootTypeQName != null) {
-                processRootTypeQName();
-            }
             // 1.1.1.1 An element declaration was stipulated by the processor
-            else if (fRootElementDeclaration != null) {
+            if (fRootElementDeclaration != null) {
                 fCurrentElemDecl = fRootElementDeclaration;
             }
             else if (fRootElementDeclQName != null) {
                 processRootElementDeclQName();
             }
+            // 1.2.1.1 A type definition was stipulated by the processor
+            else if (fRootTypeDefinition != null) {
+                fCurrentType = fRootTypeDefinition;
+            }
+            else if (fRootTypeQName != null) {
+                processRootTypeQName();
+            }
         }
         
         // if there was no processor stipulated type



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to