diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2006-01-06 15:58:41 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2006-01-06 15:58:41 +0300 |
commit | 607ee5bf7b8ad88f8a83d6fb59a64002998f0b1b (patch) | |
tree | a95bac29c89e2b0ad6c8d06ac8862ac0fd7c034f /mcs/class/System.XML | |
parent | fd4622ca847010ec7ba0752f0bf7bfc63502adea (diff) |
2006-01-06 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchemaSet.cs : reverted previous fix; it broke inclusions.
* XmlSchemaSetTests.cs : reverted the patch, thus restore [Ignore].
svn path=/trunk/mcs/; revision=55146
Diffstat (limited to 'mcs/class/System.XML')
4 files changed, 14 insertions, 14 deletions
diff --git a/mcs/class/System.XML/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/System.Xml.Schema/ChangeLog index 99f5fe328ef..e6955d0b222 100644 --- a/mcs/class/System.XML/System.Xml.Schema/ChangeLog +++ b/mcs/class/System.XML/System.Xml.Schema/ChangeLog @@ -1,5 +1,9 @@ 2006-01-06 Atsushi Enomoto <atsushi@ximian.com> + * XmlSchemaSet.cs : reverted previous fix; it broke inclusions. + +2006-01-06 Atsushi Enomoto <atsushi@ximian.com> + * XmlSchemaSet.cs : Add() needs (consistent) namespace duplicate check. 2006-01-06 Atsushi Enomoto <atsushi@ximian.com> diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs index d194f3bd879..8b39ba965a3 100644 --- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs +++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs @@ -158,17 +158,9 @@ namespace System.Xml.Schema } } - void CheckDuplicateNS (string targetNamespace) - { - if (Schemas (GetSafeNs (targetNamespace)).Count > 0) - throw new ArgumentException (String.Format ("Corresponding schema for namespace '{0}' has been already added.", targetNamespace)); - } - + [MonoTODO ("It has weird namespace duplication check that is different from Add(XmlSchema).")] public XmlSchema Add (string targetNamespace, XmlReader reader) { - // don't check it here; check only in-use TargetNamespace - //CheckDuplicateNS (targetNamespace); - XmlSchema schema = XmlSchema.Read (reader, handler); if (targetNamespace != null && targetNamespace.Length > 0) @@ -177,6 +169,7 @@ namespace System.Xml.Schema return schema; } + [MonoTODO ("Check the exact behavior when namespaces are in conflict (but it would be preferable to wait for 2.0 RTM).")] public void Add (XmlSchemaSet schemaSet) { ArrayList al = new ArrayList (); @@ -190,12 +183,10 @@ namespace System.Xml.Schema Add (schema); } + [MonoTODO ("We need to research more about the expected behavior")] public XmlSchema Add (XmlSchema schema) { - if (!schemas.Contains (schema)) { - CheckDuplicateNS (schema.TargetNamespace); - schemas.Add (schema); - } + schemas.Add (schema); AddGlobalComponents (schema); return schema; } @@ -336,6 +327,7 @@ namespace System.Xml.Schema return schemas; } + [MonoTODO] public ICollection Schemas (string targetNamespace) { targetNamespace = GetSafeNs (targetNamespace); diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog index 9aa293571cf..0924fe928d0 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog +++ b/mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog @@ -1,5 +1,9 @@ 2006-01-06 Atsushi Enomoto <atsushi@ximian.com> + * XmlSchemaSetTests.cs : reverted the patch, thus restore [Ignore]. + +2006-01-06 Atsushi Enomoto <atsushi@ximian.com> + * XmlSchemaSetTests.cs : re-enabled test for Add() which was inconsistent in beta versions. diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs index 27ba7b47646..d8d006fb860 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs @@ -56,7 +56,7 @@ namespace MonoTests.System.Xml } [Test] - //[Ignore ("This behavior might be changed, since Add(XmlSchema) does not throw any exceptions, while this does.")] + [Ignore ("This behavior might be changed, since Add(XmlSchema) does not throw any exceptions, while this does.")] [ExpectedException (typeof (ArgumentException))] public void AddTwice () { |