xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amass...@apache.org
Subject svn commit: r803516 - /xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp
Date Wed, 12 Aug 2009 14:00:33 GMT
Author: amassari
Date: Wed Aug 12 14:00:33 2009
New Revision: 803516

URL: http://svn.apache.org/viewvc?rev=803516&view=rev
Log:
When parsing a "final" attribute, an empty value means an empty set, not "use finalDefault"
(XERCESC-1716)

Modified:
    xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp

Modified: xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp?rev=803516&r1=803515&r2=803516&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp Wed Aug 12 14:00:33 2009
@@ -5245,9 +5245,9 @@
     const XMLCh* finalVal = (isRoot) ? getElementAttValue(elem, SchemaSymbols::fgATT_FINALDEFAULT)
                                      : getElementAttValue(elem, SchemaSymbols::fgATT_FINAL);
 
-    if (!finalVal || !*finalVal) {
+    // finalVal == 0 means 'final attribute is missing'; *finalVal == 0 means 'final="" found'
+    if (finalVal == 0)
         return fSchemaInfo->getFinalDefault();
-    }
 
     int finalSet = 0;
 
@@ -5296,7 +5296,7 @@
         }
     } //end while
 
-    return (finalSet == 0 ? fSchemaInfo->getFinalDefault() : finalSet);
+    return finalSet;
 }
 
 



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


Mime
View raw message