diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2008-09-09 17:20:23 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2008-09-09 17:20:23 +0400 |
commit | 65acaeb5a9ae5a95ee1799a7e58d311e9ef7fb3f (patch) | |
tree | 6fad6ef414aaa02416e1607d3c1bb83be6cf11cf /mcs/class/System.XML/System.Xml.Schema | |
parent | bf96da65540774a723e0712c49688939c930f635 (diff) |
2008-09-09 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchemaValidator.cs : do not try to validate CloseStartElement
when it should be skipped. Fixed bug #422581.
* XmlSchemaValidatorTests.cs : added test for bug #422581.
* 422581.xsd, 422581.xml : new files.
svn path=/trunk/mcs/; revision=112583
Diffstat (limited to 'mcs/class/System.XML/System.Xml.Schema')
-rw-r--r-- | mcs/class/System.XML/System.Xml.Schema/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/mcs/class/System.XML/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/System.Xml.Schema/ChangeLog index 1ce4f0b56c4..8a172831309 100644 --- a/mcs/class/System.XML/System.Xml.Schema/ChangeLog +++ b/mcs/class/System.XML/System.Xml.Schema/ChangeLog @@ -1,3 +1,8 @@ +2008-09-09 Atsushi Enomoto <atsushi@ximian.com> + + * XmlSchemaValidator.cs : do not try to validate CloseStartElement + when it should be skipped. Fixed bug #422581. + 2008-08-19 Jb Evain <jbevain@novell.com> * XmlSchema_2_1.cs diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs index 4338e5f98ce..a7da8cfd3c6 100644 --- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs +++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs @@ -502,7 +502,9 @@ namespace System.Xml.Schema if (schemas.Count == 0) return; - AssessCloseStartElementSchemaValidity (info); + if (skipValidationDepth < 0 || depth <= skipValidationDepth) + AssessCloseStartElementSchemaValidity (info); + depth++; } finally { occuredAtts.Clear (); } @@ -720,8 +722,6 @@ namespace System.Xml.Schema next = state.Create (XmlSchemaParticle.Empty); } Context.State = next; - - depth++; } // It must be invoked after xsi:nil turned out not to be in |