You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2008/02/25 16:49:10 UTC

svn commit: r630888 - /xerces/c/branches/xerces-2/src/xercesc/validators/schema/TraverseSchema.cpp

Author: amassari
Date: Mon Feb 25 07:49:00 2008
New Revision: 630888

URL: http://svn.apache.org/viewvc?rev=630888&view=rev
Log:
Validate the attributes of a simple type definition before trusting its content (XERCESC-1718)

Modified:
    xerces/c/branches/xerces-2/src/xercesc/validators/schema/TraverseSchema.cpp

Modified: xerces/c/branches/xerces-2/src/xercesc/validators/schema/TraverseSchema.cpp
URL: http://svn.apache.org/viewvc/xerces/c/branches/xerces-2/src/xercesc/validators/schema/TraverseSchema.cpp?rev=630888&r1=630887&r2=630888&view=diff
==============================================================================
--- xerces/c/branches/xerces-2/src/xercesc/validators/schema/TraverseSchema.cpp (original)
+++ xerces/c/branches/xerces-2/src/xercesc/validators/schema/TraverseSchema.cpp Mon Feb 25 07:49:00 2008
@@ -1188,6 +1188,16 @@
         return 0;
     }
 
+    // -------------------------------------------------------------------
+    // Check attributes
+    // -------------------------------------------------------------------
+    unsigned short scope = (topLevel) ? GeneralAttributeCheck::E_SimpleTypeGlobal
+                                      : GeneralAttributeCheck::E_SimpleTypeLocal;
+
+    fAttributeCheck.checkAttributes(
+        childElem, scope, this, topLevel, fNonXSAttList
+    );
+
     if (nameEmpty) { // anonymous simpleType
         name = genAnonTypeName(fgAnonSNamePrefix);
     }
@@ -1209,16 +1219,6 @@
     DatatypeValidator* dv = fDatatypeRegistry->getDatatypeValidator(fullName);
 
     if (!dv) {
-
-        // -------------------------------------------------------------------
-        // Check attributes
-        // -------------------------------------------------------------------
-        unsigned short scope = (topLevel) ? GeneralAttributeCheck::E_SimpleTypeGlobal
-                                          : GeneralAttributeCheck::E_SimpleTypeLocal;
-
-        fAttributeCheck.checkAttributes(
-            childElem, scope, this, topLevel, fNonXSAttList
-        );
 
         // Circular constraint checking
         if (fCurrentTypeNameStack->containsElement(fullTypeNameId)) {



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