tng 2003/01/03 08:34:26 Modified: c/src/xercesc/validators/schema TraverseSchema.cpp Log: Should check null pointer first before assigning anonymous. Revision Changes Path 1.47 +13 -13 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.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- TraverseSchema.cpp 31 Dec 2002 16:35:40 -0000 1.46 +++ TraverseSchema.cpp 3 Jan 2003 16:34:25 -0000 1.47 @@ -1038,21 +1038,21 @@ popCurrentTypeNameStack(); return 0; } - + DatatypeValidator *tmpDV = traverseByList(childElem, content, name, fullName, finalSet); - if(nameEmpty) + if(tmpDV && nameEmpty) tmpDV->setAnonymous(); return tmpDV; } else if (XMLString::equals(varietyName, SchemaSymbols::fgELT_RESTRICTION)) { //traverse Restriction DatatypeValidator *tmpDV = traverseByRestriction(childElem, content, name, fullName, finalSet); - if(nameEmpty) + if(tmpDV && nameEmpty) tmpDV->setAnonymous(); return tmpDV; } else if (XMLString::equals(varietyName, SchemaSymbols::fgELT_UNION)) { //traverse union DatatypeValidator *tmpDV = traverseByUnion(childElem, content, name, fullName, finalSet, baseRefContext); - if(nameEmpty) + if(tmpDV && nameEmpty) tmpDV->setAnonymous(); return tmpDV; } @@ -1158,7 +1158,7 @@ // ------------------------------------------------------------------ typeInfo = new ComplexTypeInfo(); if(isAnonymous) { - typeInfo->setAnonymous(); + typeInfo->setAnonymous(); } fCurrentScope = fScopeCount++; @@ -6777,7 +6777,7 @@ unsigned int nameURI = nameURIList->elementAt(i); - if (nameURI != compareURI && + if (nameURI != compareURI && nameURI != (unsigned int) fEmptyNamespaceURI) { tmpURIList.addElement(nameURI); } @@ -6932,7 +6932,7 @@ // 6. If either O1 or O2 is a pair of not and absent and the other is a // set, then: // 1. If the set includes absent then any must be the value. - // 2. If the set does not include absent, then a pair of not and + // 2. If the set does not include absent, then a pair of not and // absent. if ((typeC == XMLAttDef::Any_Other && typeR == XMLAttDef::Any_List) || (typeR == XMLAttDef::Any_Other && typeC == XMLAttDef::Any_List)) { @@ -6955,7 +6955,7 @@ if (nameURIList) { - // 6.1 result is any + // 6.1 result is any if (nameURIList->containsElement(compareURI)) { resultWildCard->setType(XMLAttDef::Any_Any); @@ -6977,19 +6977,19 @@ } // 5. not and namespace else { - + // 5.3 result is not expressible if (!nameURIList) { resultWildCard->setType(XMLAttDef::AttTypes_Unknown); attNameR->setURI(fEmptyNamespaceURI); } else { - bool containsAbsent = + bool containsAbsent = nameURIList->containsElement(fEmptyNamespaceURI); - bool containsNamespace = + bool containsNamespace = nameURIList->containsElement(compareURI); - // 5.1 result is any + // 5.1 result is any if (containsAbsent && containsNamespace) { resultWildCard->setType(XMLAttDef::Any_Any);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]