Facets: pattern | ||
The pattern facet can be used to constraint an element to contain only a series of characters. A commonly used pattern value is a regular expression. For example, in the code snippet on the right, the EmpInitials element can contain only two uppercase letters between A and Z. Similarly, if the pattern value is as follows, [Abc] indicates that the element can contain only three permissible values: A, b, or c. <xs:pattern value="[Abc]"/> If pattern value="[a-zA-Z][[a-zA-Z]", the element can contain only two lowercase or uppercase characters between the letters A and Z. In addition, if pattern value="[0-9][[0-9]", the element can contain only two numeric digits between 0 and 9. |
|
|
Click the Next button to continue. |