+2004-01-21 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XsdKeyTable.cs : Matching evaluation is incorrect when path is more
+ than depth 2.
+ * XsdValidatingReader.cs : Should clear LocalTypeDefinition when no
+ xsi:type was specified.
+ Moved character validation inside AssessEndElementSchemaValidity().
+
2004-01-20 Atsushi Enomoto <atsushi@ximian.com>
* XsdParticleValidationState.cs : Use ValidatedMaxOccurs instead of
iter--;\r
\r
XsdIdentityStep step;\r
- for (int x = 0; x <= iter; x++, iter--) {\r
- step = path.OrderedSteps [iter - x];\r
+ for (int x = 0; 0 <= iter; x++, iter--) {\r
+ step = path.OrderedSteps [iter];\r
if (step.IsAnyName)\r
continue;\r
XmlQualifiedName qname = (XmlQualifiedName) qnameStack [qnameStack.Count - x - 1];\r
}
}
}
+ else
+ context.LocalTypeDefinition = null;
// Create Validation Root, if not exist.
// [Schema Validity Assessment (Element) 1.1]
context.LocalTypeDefinition = GetLocalTypeDefinition (xsiType);
AssessLocalTypeDerivationOK (context.LocalTypeDefinition, element.ElementType, element.BlockResolved);
}
+ else
+ context.LocalTypeDefinition = null;
// 5 Not all things cannot be assessed here.
// It is common to 5.1 and 5.2
childParticleState = context.ParticleState;
ValidateEndElementParticle (); // validate against childrens' state.
+ if (shouldValidateCharacters) {
+ ValidateEndCharacters ();
+ shouldValidateCharacters = false;
+ }
+
context.Load (reader.Depth);
// 3.3.4 Assess ElementLocallyValidElement 5: value constraints.
if (schemas.Count == 0)
break;
-// context.Load (reader.Depth);
if (skipValidationDepth < 0 || reader.Depth <= skipValidationDepth) {
if (shouldValidateCharacters) {
ValidateEndCharacters ();
if (reader.Depth == skipValidationDepth) {
skipValidationDepth = -1;
context.Clear ();
- } else {
-// context.Load (reader.Depth);
- if (shouldValidateCharacters) {
- ValidateEndCharacters ();
- shouldValidateCharacters = false;
- }
- AssessEndElementSchemaValidity ();
}
+ else
+ AssessEndElementSchemaValidity ();
+
storedCharacters.Length = 0;
childParticleState = null;
popContext = true;