From a94595f572153522c41488bd042ae6b71ffb8997 Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Thu, 9 Nov 2006 08:38:08 +0000 Subject: [PATCH] 2006-11-09 Atsushi Enomoto * NewMonoXSD.cs : process all elements including imported ones. To do so, use post-compilation schema items. svn path=/trunk/mcs/; revision=67578 --- mcs/tools/mono-xsd/ChangeLog | 5 +++++ mcs/tools/mono-xsd/NewMonoXSD.cs | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mcs/tools/mono-xsd/ChangeLog b/mcs/tools/mono-xsd/ChangeLog index f0a0f73b9d9..d45f14a2d2d 100644 --- a/mcs/tools/mono-xsd/ChangeLog +++ b/mcs/tools/mono-xsd/ChangeLog @@ -1,3 +1,8 @@ +2006-11-09 Atsushi Enomoto + + * NewMonoXSD.cs : process all elements including imported ones. To do + so, use post-compilation schema items. + 2004-07-12 Lluis Sanchez Gual * NewMonoXSD.cs: Don't write the exception trace for common parameter diff --git a/mcs/tools/mono-xsd/NewMonoXSD.cs b/mcs/tools/mono-xsd/NewMonoXSD.cs index b0c983b5438..5da7b589bda 100644 --- a/mcs/tools/mono-xsd/NewMonoXSD.cs +++ b/mcs/tools/mono-xsd/NewMonoXSD.cs @@ -403,9 +403,9 @@ namespace Mono.Util { { foreach (XmlSchema schema in schemas) { if (!schema.IsCompiled) schema.Compile (null); - foreach (XmlSchemaObject ob in schema.Items) - if (ob is XmlSchemaElement) - qnames.Add (((XmlSchemaElement)ob).QualifiedName); + foreach (XmlSchemaElement el in schema.Elements.Values) + if (!qnames.Contains (el.QualifiedName)) + qnames.Add (el.QualifiedName); } } -- 2.25.1