Constraining Attribute Values
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 not
assigning required values to the associated ado recordset.
The problem is that ado will assign a default value of 0 to an integer, if
the field value is not set. When the encoder program sees this field as
not null or not "", then it will include the attribute in the element. Because
the 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 0
as a value, but I am not seeing an attribute setting to make this happen.
Has anyone been down this road before?
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL