Skip Navigation

Understanding Patterns

The XML schema defines patterns that show the acceptable values for an element or attribute. Patterns can define what type of character, sequence, length, minimum and maximum values, and any other constraints that exist for the element or attribute. The alpha requirements appear within square brackets ([ ]), and the length appears within curly brackets ({ }). If the requirement is a yes/no or true/false option, this appears as [YN] or [TF].

Example:

[a-zA-Z]{3}

This pattern shows that the acceptable values for this element are:

  • Lowercase alpha characters from a to z.
  • Uppercase alpha characters from A to Z.
  • Entry must be three (3) characters in length.