Designing Your own XML Schema: Restrictions and User Defined Types (Page 1 of 7 )
If you are new to XML Schema, I strongly suggest you to go through my first article in the same series, which you can find here.
Restricting the digits in an XML Schema
As, I already explained various aspects of XML Schemas, including their definition, simple types and complex types, restrictions and so forth in my previous articles, I shall not repeat them again in this article.
Let us consider that we would like to have any employee's salary to be restricted to only certain digits (towards both precision and scale). This is possible with an existing schema type, “decimal.” Let us look at the following complete schema: