+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
if (schemas.Count == 0)
return;
- AssessCloseStartElementSchemaValidity (info);
+ if (skipValidationDepth < 0 || depth <= skipValidationDepth)
+ AssessCloseStartElementSchemaValidity (info);
+ depth++;
} finally {
occuredAtts.Clear ();
}
next = state.Create (XmlSchemaParticle.Empty);
}
Context.State = next;
-
- depth++;
}
// It must be invoked after xsi:nil turned out not to be in
+2008-09-09 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlSchemaValidatorTests.cs : added test for bug #422581.
+
2008-06-06 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchemaTests.cs : fix file path.
v.ValidateElement ("foo", "", info, null, null, null, null);
v.ValidateAttribute ("bar", "", "", info);
}
+
+ [Test]
+ public void SkipInvolved () // bug #422581
+ {
+ XmlReader schemaReader = XmlReader.Create ("Test/XmlFiles/xsd/422581.xsd");
+ XmlSchema schema = XmlSchema.Read (schemaReader, null);
+ XmlReaderSettings settings = new XmlReaderSettings ();
+ settings.ValidationType = ValidationType.Schema;
+ settings.Schemas.Add (schema);
+ XmlReader reader = XmlReader.Create ("Test/XmlFiles/xsd/422581.xml", settings);
+ while (reader.Read ());
+ }
}
}
--- /dev/null
+<?xml version="1.0"?>\r
+<root foo="1">\r
+ <dummy>\r
+ <bar>\r
+ <elmnt name="value" />\r
+ </bar>\r
+ </dummy>\r
+ <dummy2></dummy2>\r
+</root>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">\r
+<xs:element name="root">\r
+ <xs:complexType>\r
+ <xs:sequence>\r
+ <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded" namespace="##any"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="foo" type="xs:integer" use="required" />\r
+ </xs:complexType>\r
+</xs:element>\r
+</xs:schema>
\ No newline at end of file
+2008-09-09 Atsushi Enomoto <atsushi@ximian.com>
+
+ * 422581.xsd, 422581.xml : new files.
+
2008-06-06 Atsushi Enomoto <atsushi@ximian.com>
* importNamespaceTest.xsd, xsdimporttest.xml, importedNamespace.xsd: