From e44cd71363ca883a668973b573e53adfa0bec055 Mon Sep 17 00:00:00 2001 From: Michael Ganss Date: Tue, 12 Nov 2024 20:43:38 +0100 Subject: [PATCH] Fix #531 --- .../xsd/simple/any.xsd | 71 ++++++++++++------- XmlSchemaClassGenerator/ModelBuilder.cs | 2 +- 2 files changed, 45 insertions(+), 28 deletions(-) diff --git a/XmlSchemaClassGenerator.Tests/xsd/simple/any.xsd b/XmlSchemaClassGenerator.Tests/xsd/simple/any.xsd index 7b0ae60a..b84a0cb9 100644 --- a/XmlSchemaClassGenerator.Tests/xsd/simple/any.xsd +++ b/XmlSchemaClassGenerator.Tests/xsd/simple/any.xsd @@ -7,31 +7,48 @@ xmlns:mstns="http://tempuri.org/default.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" > - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator/ModelBuilder.cs b/XmlSchemaClassGenerator/ModelBuilder.cs index d186fa9e..8e15ad36 100644 --- a/XmlSchemaClassGenerator/ModelBuilder.cs +++ b/XmlSchemaClassGenerator/ModelBuilder.cs @@ -597,7 +597,7 @@ private TypeModel CreateTypeModel(XmlSchemaComplexType complexType) if (baseType is not XmlSchemaComplexType baseComplexType) continue; - if (baseComplexType.AttributeWildcard != null) + if (baseComplexType.QualifiedName != AnyType && baseComplexType.AttributeWildcard != null) { hasAnyAttribute = false; break;