Constraining Attribute Values

wxdqz

New Member
I have a schema that has required element atrributes as dt:type="int" required="yes".I was doing unit testing trying to make my xml msg fail validation, by notassigning required values to the associated ado recordset.The problem is that ado will assign a default value of 0 to an integer, ifthe field value is not set. When the encoder program sees this field asnot null or not "", then it will include the attribute in the element. Becausethe value is 0, it passes validation against the schema.I don't want to have to test the ado recordset field values in my application,because of the potential complexity for finding all cases for all fields.I want to contstrain the values in my schema definition, to not allow 0as a value, but I am not seeing an attribute setting to make this happen.Has anyone been down this road before?Thanks,Brandon
 
Back
Top