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>2005-09-30 10:37:56 +0400
committerAtsushi Eno <atsushieno@gmail.com>2005-09-30 10:37:56 +0400
commitcaf514112ccdef45adef97c20c3c89ed8c027e6b (patch)
tree8a0ae13cf81d603a91984a698d516d730bcd71f0 /mcs/class/System.XML/Mono.Xml.Schema
parenta3532d02522db7dcf1b61fc2890b4ae3f8678464 (diff)
2005-09-30 Atsushi Enomoto <atsushi@ximian.com>
* XsdValidatingReader.cs: allow validation for such XmlReader whose ReadState is Interactive (hold different "is started" flag). This is a fix for nvdl support. svn path=/trunk/mcs/; revision=51034
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.Schema')
-rw-r--r--mcs/class/System.XML/Mono.Xml.Schema/ChangeLog6
-rw-r--r--mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs6
2 files changed, 10 insertions, 2 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.Schema/ChangeLog b/mcs/class/System.XML/Mono.Xml.Schema/ChangeLog
index f7524ac86c6..b76aae739b8 100644
--- a/mcs/class/System.XML/Mono.Xml.Schema/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.Schema/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-30 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XsdValidatingReader.cs: allow validation for such XmlReader whose
+ ReadState is Interactive (hold different "is started" flag). This
+ is a fix for nvdl support.
+
2005-09-25 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchemaValidatingReader.cs: XmlSchemaValidationFlags updates.
diff --git a/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs b/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
index 4355366e729..67616cd397c 100644
--- a/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
+++ b/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
@@ -70,6 +70,7 @@ namespace Mono.Xml.Schema
ValidationType validationType;
XmlSchemaSet schemas = new XmlSchemaSet ();
bool namespaces = true;
+ bool validationStarted;
#region ID Constraints
bool checkIdentity = true;
@@ -147,7 +148,7 @@ namespace Mono.Xml.Schema
public XmlSchemaSet Schemas {
get { return schemas; }
set {
- if (ReadState != ReadState.Initial)
+ if (validationStarted)
throw new InvalidOperationException ("Schemas must be set before the first call to Read().");
schemas = value;
}
@@ -189,7 +190,7 @@ namespace Mono.Xml.Schema
public ValidationType ValidationType {
get { return validationType; }
set {
- if (ReadState != ReadState.Initial)
+ if (validationStarted)
throw new InvalidOperationException ("ValidationType must be set before reading.");
validationType = value;
}
@@ -1545,6 +1546,7 @@ namespace Mono.Xml.Schema
public override bool Read ()
{
+ validationStarted = true;
currentDefaultAttribute = -1;
defaultAttributeConsumed = false;
currentAttrType = null;