xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amass...@apache.org
Subject svn commit: r803551 - /xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp
Date Wed, 12 Aug 2009 15:11:57 GMT
Author: amassari
Date: Wed Aug 12 15:11:56 2009
New Revision: 803551

URL: http://svn.apache.org/viewvc?rev=803551&view=rev
Log:
When parsing a "block" attribute, an empty value means an empty set, not "use blockDefault"

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=803551&r1=803550&r2=803551&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp Wed Aug 12 15:11:56 2009
@@ -5194,9 +5194,9 @@
     const XMLCh* blockVal = (isRoot) ? getElementAttValue(elem, SchemaSymbols::fgATT_BLOCKDEFAULT)
                                      : getElementAttValue(elem, SchemaSymbols::fgATT_BLOCK);
 
-    if (!blockVal || !*blockVal) {
+    // blockVal == 0 means 'block attribute is missing'; *blockVal == 0 means 'block="" found'
+    if (blockVal == 0)
         return fSchemaInfo->getBlockDefault();
-    }
 
     int blockSet = 0;
 
@@ -5236,7 +5236,7 @@
         }
     } //end while
 
-    return (blockSet == 0 ? fSchemaInfo->getBlockDefault() : blockSet);
+    return blockSet;
 }
 
 int TraverseSchema::parseFinalSet(const DOMElement* const elem,



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


Mime
View raw message