]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Bug fix to importer and exporter generation for simpleType top level 59/659/1
authorReino Ruusu <reino.ruusu@vtt.fi>
Wed, 28 Jun 2017 15:03:14 +0000 (18:03 +0300)
committerReino Ruusu <reino.ruusu@vtt.fi>
Wed, 28 Jun 2017 15:03:14 +0000 (18:03 +0300)
elements.

Change-Id: I4f8df343ddfcf9c19e24d4d8563be64b3103fa54

org.simantics.xml.sax/src/org/simantics/xml/sax/SchemaConversionBase.java

index 8a2785f18848b71d9df00e3cd8896ab4aac7ba11..cb0f7629f2ca38f28f16a7d9cc11313f6dc6444c 100644 (file)
@@ -1393,12 +1393,15 @@ public final class SchemaConversionBase {
                                QName type = topLevelElement.getType();
                                if (!type.getNamespaceURI().equals(SCHEMA_NS)) {
                                        SchemaObject obj = complexTypeName.get(type.getLocalPart());
-       //                              if (obj == null)
-       //                                      obj = simpleTypeName.get(type.getLocalPart());
                                        if (obj != null) {
                                                inheritance.baseClass = getName(obj);
                                                inheritance.type = InheritanceType.ComplexType;
                                        }
+                                       else {
+                                               obj = simpleTypeName.get(type.getLocalPart());
+                                               if (obj != null)
+                                                       getAtomicTypeInheritance(type, inheritance);
+                                       }
                                } else {
                                        TypeEntry entry = getTypeEntry(type);
                                        if (entry != null) {