You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2008/12/07 21:50:38 UTC

svn commit: r724199 - /xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java

Author: mrglavas
Date: Sun Dec  7 12:50:38 2008
New Revision: 724199

URL: http://svn.apache.org/viewvc?rev=724199&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/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java

Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=724199&r1=724198&r2=724199&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Sun Dec  7 12:50:38 2008
@@ -1966,20 +1966,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: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org