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:
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs')
-rw-r--r--mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs31
1 files changed, 11 insertions, 20 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs b/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
index c36d86f2008..a84f88c3602 100644
--- a/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
+++ b/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
@@ -1541,39 +1541,30 @@ namespace Mono.Xml.Schema
currentDefaultAttribute = -1;
defaultAttributeConsumed = false;
currentAttrType = null;
+#region ID Constraints
+ if (this.checkIdentity)
+ idManager.OnStartElement ();
+#endregion
defaultAttributes = emptyAttributeArray;
bool result = reader.Read ();
+#region ID Constraints
+ // 3.3.4 ElementLocallyValidElement 7 = Root Valid.
+ if (!result && this.checkIdentity &&
+ idManager.HasMissingIDReferences ())
+ HandleError ("There are missing ID references: " + idManager.GetMissingIDString ());
+#endregion
// FIXME: schemaLocation could be specified
// at any Depth.
if (reader.Depth == 0 &&
- reader.NodeType == XmlNodeType.Element) {
- // If the reader is DTDValidatingReader (it
- // is the default behavior of
- // XmlValidatingReader) and DTD didn't appear,
- // we could just use its source XmlReader.
- DTDValidatingReader dtdr = reader as DTDValidatingReader;
- if (dtdr != null && dtdr.DTD == null)
- reader = dtdr.Source;
-
+ reader.NodeType == XmlNodeType.Element)
ExamineAdditionalSchema ();
- }
if (schemas.Count == 0)
return result;
if (!schemas.IsCompiled)
schemas.Compile ();
-#region ID Constraints
- if (this.checkIdentity)
- idManager.OnStartElement ();
-
- // 3.3.4 ElementLocallyValidElement 7 = Root Valid.
- if (!result && this.checkIdentity &&
- idManager.HasMissingIDReferences ())
- HandleError ("There are missing ID references: " + idManager.GetMissingIDString ());
-#endregion
-
switch (reader.NodeType) {
case XmlNodeType.Element:
#region Key Constraints