From b2121173f4705604b1940a7551884588fc6925db Mon Sep 17 00:00:00 2001 From: Christian-Block <48085349+Christian-Block@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:51:21 +0200 Subject: [PATCH] fix eclipse-aaspe/package-explorer#237 --- src/AasxDictionaryImport/Eclass/Model.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/AasxDictionaryImport/Eclass/Model.cs b/src/AasxDictionaryImport/Eclass/Model.cs index 3d84ede8..73c4f6a9 100644 --- a/src/AasxDictionaryImport/Eclass/Model.cs +++ b/src/AasxDictionaryImport/Eclass/Model.cs @@ -88,7 +88,12 @@ public override bool IsValidPath(string path) { // Verify that the root element is eclass_dictionary and find the header element for different // schema versions - if (reader.IsStartElement("eclass_dictionary", Namespaces.Dic30.NamespaceName)) + if (reader.IsStartElement("eclass_dictionary", Namespaces.Dic40.NamespaceName)) + { + if (!reader.ReadToDescendant("header", Namespaces.Hea40.NamespaceName)) + return false; + } + else if (reader.IsStartElement("eclass_dictionary", Namespaces.Dic30.NamespaceName)) { if (!reader.ReadToDescendant("header", Namespaces.Hea30.NamespaceName)) return false; @@ -869,9 +874,13 @@ internal static class Namespaces public static XNamespace Dic30 = "urn:eclass:xml-schema:dictionary:3.0"; + public static XNamespace Dic40 = "urn:eclass:xml-schema:dictionary:4.0"; + public static XNamespace Hea20 = "urn:eclass:xml-schema:header:2.0"; public static XNamespace Hea30 = "urn:eclass:xml-schema:header:3.0"; + + public static XNamespace Hea40 = "urn:eclass:xml-schema:header:4.0"; } internal static class Extensions