You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2006/08/18 19:02:32 UTC
svn commit: r432639 -
/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp
Author: robbinspg
Date: Fri Aug 18 10:02:31 2006
New Revision: 432639
URL: http://svn.apache.org/viewvc?rev=432639&view=rev
Log:
TUSCANY-625 backout previous "fix"
Modified:
incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp
Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp?rev=432639&r1=432638&r2=432639&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp Fri Aug 18 10:02:31 2006
@@ -606,11 +606,7 @@
if (!bInSchema) return;
- SchemaInfo schemaInf;
- SDOSchemaSAX2Parser schemaParser(schemaInf, (ParserErrorSetter*)setter);
-
SDOXMLString schemaLocation = attributes.getValue("schemaLocation");
- SDOXMLString importNamespace = attributes.getValue("namespace");
if (!schemaLocation.isNull())
{
if (startSecondaryParse(schemaParser,schemaLocation) == 0)
@@ -619,76 +615,23 @@
// we were not able to start the parse
return;
}
- }
- else
- {
- // schemaLocation isn't present. Try loading namespace for import
- if (localname.equalsIgnoreCase("import")
- && !importNamespace.isNull())
- {
- try
- {
- schemaParser.parse(importNamespace);
- }
- catch (SDORuntimeException&)
+
+
+ TypeDefinitionsImpl& typedefs = schemaParser.getTypeDefinitions();
+ XMLDAS_TypeDefs types = typedefs.types;
+ XMLDAS_TypeDefs::iterator iter;
+ for (iter=types.begin(); iter != types.end(); iter++)
+ {
+ if ((*iter).second.name.equals("RootType")
{
- return;
+ // This must be true for an import/include to be
}
- }
- else
- {
- return;
- }
- }
-
-
- TypeDefinitionsImpl& typedefs = schemaParser.getTypeDefinitions();
- XMLDAS_TypeDefs types = typedefs.types;
- XMLDAS_TypeDefs::iterator iter;
- for (iter=types.begin(); iter != types.end(); iter++)
- {
- if ((*iter).second.name.equals("RootType")
- && currentType.name.equals("RootType")
- && (*iter).second.uri.equals(currentType.uri))
- {
- // This must be true for an import/include to be
- // legally positioned
-
- XMLDAS_TypeDefs::iterator find = typeDefinitions.types.find(
- (*iter).first);
-
- std::list<PropertyDefinitionImpl>::iterator propit;
- std::list<PropertyDefinitionImpl>::iterator currpropit;
- bool found;
-
- for (propit = (*iter).second.properties.begin() ;
- propit != (*iter).second.properties.end(); ++ propit)
+ else
{
- found = false;
- // do not merge properties whose names clash
- for ( currpropit = currentType.properties.begin();
- currpropit != currentType.properties.end();
- ++currpropit)
- {
- if ((*currpropit).name.equals((*propit).name))
- {
- found = true;
- break;
- }
- }
- if (!found)
- {
- currentType.properties.insert(
- currentType.properties.end(),*propit);
- }
+ typeDefinitions.types.insert(*iter);
}
}
- else
- {
- typeDefinitions.types.insert(*iter);
- }
- }
-
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org