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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to