From 12cd5c3850b4907ca8e40286bf8e386b5440be6d Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Wed, 28 Jun 2017 18:03:14 +0300 Subject: [PATCH] Bug fix to importer and exporter generation for simpleType top level elements. Change-Id: I4f8df343ddfcf9c19e24d4d8563be64b3103fa54 --- .../src/org/simantics/xml/sax/SchemaConversionBase.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org.simantics.xml.sax/src/org/simantics/xml/sax/SchemaConversionBase.java b/org.simantics.xml.sax/src/org/simantics/xml/sax/SchemaConversionBase.java index 8a2785f..cb0f762 100644 --- a/org.simantics.xml.sax/src/org/simantics/xml/sax/SchemaConversionBase.java +++ b/org.simantics.xml.sax/src/org/simantics/xml/sax/SchemaConversionBase.java @@ -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) { -- 2.47.1