Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2007-07-25 13:31:38 +0400
committerAtsushi Eno <atsushieno@gmail.com>2007-07-25 13:31:38 +0400
commit97eb3b6ec25c30ef2f48a2c44430f349dc7d2ab4 (patch)
tree039f5ccbc5b1fcb04906688a50c3f4ff0107a412 /mcs/class/System.XML/System.Xml.Schema
parenta085bbc7c9a8fe0c3af04f06a5f53a024993f4b2 (diff)
2007-07-25 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchemaValidator.cs : do not reject whitespaces in elementOnly content model. Fixed bug #82183. * XsdValidatingReader.cs : reject more whitespaces in empty model element. svn path=/trunk/mcs/; revision=82652
Diffstat (limited to 'mcs/class/System.XML/System.Xml.Schema')
-rw-r--r--mcs/class/System.XML/System.Xml.Schema/ChangeLog5
-rw-r--r--mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs5
2 files changed, 9 insertions, 1 deletions
diff --git a/mcs/class/System.XML/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/System.Xml.Schema/ChangeLog
index f0e02174d53..bf7edfe293b 100644
--- a/mcs/class/System.XML/System.Xml.Schema/ChangeLog
+++ b/mcs/class/System.XML/System.Xml.Schema/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlSchemaValidator.cs : do not reject whitespaces in elementOnly
+ content model. Fixed bug #82183.
+
2007-07-17 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchemaValidator.cs : dependent changes to
diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs
index 65f201a1d15..38ec56824d4 100644
--- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs
@@ -908,9 +908,12 @@ namespace System.Xml.Schema
dt = ct.Datatype;
switch (ct.ContentType) {
case XmlSchemaContentType.ElementOnly:
+ if (value.Length > 0 && !XmlChar.IsWhitespace (value))
+ HandleError ("Character content not allowed in an elementOnly model.");
+ break;
case XmlSchemaContentType.Empty:
if (value.Length > 0)
- HandleError ("Character content not allowed.");
+ HandleError ("Character content not allowed in an empty model.");
break;
}
}