gareth 2002/12/19 06:06:38 Modified: c/src/xercesc/validators/schema TraverseSchema.cpp Log: we now set the anonymous flag in DatatypeValidator and ComplexTypeInfo if needed. Patch by Peter Volchek. Revision Changes Path 1.45 +16 -2 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.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- TraverseSchema.cpp 18 Dec 2002 14:17:58 -0000 1.44 +++ TraverseSchema.cpp 19 Dec 2002 14:06:37 -0000 1.45 @@ -1053,6 +1053,13 @@ } } + + if(dv) { + if(nameEmpty) { + dv->setAnonymous(); + } + } + return dv; } @@ -1077,6 +1084,7 @@ // Get the attributes of the complexType const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME); + bool isAnonymous = false; if (!name || !*name) { @@ -1088,8 +1096,10 @@ if (recursingTypeName) name = recursingTypeName; - else + else { name = genAnonTypeName(fgAnonCNamePrefix); + isAnonymous = true; + } } if (!XMLString::isValidNCName(name)) { @@ -1145,6 +1155,10 @@ // Register the type // ------------------------------------------------------------------ typeInfo = new ComplexTypeInfo(); + if(isAnonymous) { + typeInfo->setAnonymous(); + } + fCurrentScope = fScopeCount++; fComplexTypeRegistry->put((void*) fullName, typeInfo); typeInfo->setTypeName(fullName);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]