XML Schema: Constraints | ||
Unlike DTDs, XML schemas enable you to specify constraints that define the valid values for elements and attributes. For example, the code snippet on the right restricts an EmpAge element to contain values between 0 and 100. In addition, you can specify regular expression values, such as [a-z], for elements and attributes. |
|
|
Click the Next button to continue. |