You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2003/03/06 19:24:26 UTC

cvs commit: xml-xerces/c/src/xercesc/validators/schema TraverseSchema.cpp

knoaman     2003/03/06 10:24:25

  Modified:    c/src/xercesc/validators/schema TraverseSchema.cpp
  Log:
  [Bug 17633] Empty complex type definition is always non-mixed even if declaration says otherwise. Patch by Alberto Massari.
  
  Revision  Changes    Path
  1.62      +12 -10    xml-xerces/c/src/xercesc/validators/schema/TraverseSchema.cpp
  
  Index: TraverseSchema.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/TraverseSchema.cpp,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- TraverseSchema.cpp	26 Feb 2003 19:30:10 -0000	1.61
  +++ TraverseSchema.cpp	6 Mar 2003 18:24:25 -0000	1.62
  @@ -1196,21 +1196,23 @@
       // Process the content of the complex type declaration
       // ------------------------------------------------------------------
       try {
  +
  +        const XMLCh* mixedVal = getElementAttValue(elem,SchemaSymbols::fgATT_MIXED);
  +        bool isMixed = false;
  +
  +        if ((mixedVal && *mixedVal)
  +            && (XMLString::equals(SchemaSymbols::fgATTVAL_TRUE, mixedVal)
  +                || XMLString::equals(fgValueOne, mixedVal))) {
  +            isMixed = true;
  +        }
  +
           if (child == 0) {
               // EMPTY complexType with complexContent
  -            processComplexContent(elem, name, child, typeInfo, 0,0,0, false);
  +            processComplexContent(elem, name, child, typeInfo, 0,0,0, isMixed);
           }
           else {
   
               const XMLCh* childName = child->getLocalName();
  -            const XMLCh* mixedVal = getElementAttValue(elem,SchemaSymbols::fgATT_MIXED);
  -            bool isMixed = false;
  -
  -            if ((mixedVal && *mixedVal)
  -                && (XMLString::equals(SchemaSymbols::fgATTVAL_TRUE, mixedVal)
  -                    || XMLString::equals(fgValueOne, mixedVal))) {
  -                isMixed = true;
  -            }
   
               if (XMLString::equals(childName, SchemaSymbols::fgELT_SIMPLECONTENT)) {
   
  
  
  

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