private void AttributeIdentityConstraints(string name, string ns, object obj, string sobj, SchemaAttDef attdef) {
for (int ci = this.startIDConstraint; ci < this.validationStack.Length; ci ++) {
// no constraint for this level
if (((ValidationState)(this.validationStack[ci])).Constr == null) {
continue;
}
// else
foreach (ConstraintStruct conuct in ((ValidationState)(this.validationStack[ci])).Constr) {
// axisFields is not null, but may be empty
foreach (LocatedActiveAxis laxis in conuct.axisFields) {
// check field from here
if (laxis.MoveToAttribute(name, ns)) {
Debug.WriteLine("Attribute Field Match!");
//attribute is only simpletype, so needn't checking...
// can fill value here, yeah!!
Debug.WriteLine("Attribute Field Filling Value!");
Debug.WriteLine("Name: " + name + "\t|\tURI: " + ns + "\t|\tValue: " + obj + "\n");
if (laxis.Ks[laxis.Column] != null) {
// should be evaluated to either an empty node-set or a node-set with exactly one member
// two matches...
SendValidationEvent (Res.Sch_FieldSingleValueExpected, name);
}
else if ((attdef != null) && (attdef.Datatype != null)){
laxis.Ks[laxis.Column] = new TypedObject (obj, sobj, attdef.Datatype);
}
}
}
}
}
}