2006-11-09 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Thu, 9 Nov 2006 08:38:08 +0000 (08:38 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Thu, 9 Nov 2006 08:38:08 +0000 (08:38 -0000)
* 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
mcs/tools/mono-xsd/NewMonoXSD.cs

index f0a0f73b9d93b5d66157db7c27ee8419bd11a2dc..d45f14a2d2d9f1b247075b75a80a8590844c11d1 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-09  Atsushi Enomoto <atsushi@ximian.com>
+
+       * NewMonoXSD.cs : process all elements including imported ones. To do
+         so, use post-compilation schema items.
+
 2004-07-12  Lluis Sanchez Gual  <lluis@novell.com>
 
        * NewMonoXSD.cs: Don't write the exception trace for common parameter
index b0c983b5438c68847307e86eb5fe7e00c428dfef..5da7b589bda6eb8119fe308059b8e1d952a8c58c 100644 (file)
@@ -403,9 +403,9 @@ namespace Mono.Util {
                        {\r
                                foreach (XmlSchema schema in schemas) {\r
                                        if (!schema.IsCompiled) schema.Compile (null);\r
-                                       foreach (XmlSchemaObject ob in schema.Items)\r
-                                               if (ob is XmlSchemaElement)\r
-                                                       qnames.Add (((XmlSchemaElement)ob).QualifiedName);\r
+                                       foreach (XmlSchemaElement el in schema.Elements.Values)\r
+                                               if (!qnames.Contains (el.QualifiedName))\r
+                                                       qnames.Add (el.QualifiedName);\r
                                }\r
                        }\r
 \r