saxon:flags - regular expression flags on xs:pattern

Saxon provides an additional attribute on the xs:pattern element, namely saxon:flags. If present, the attribute is a string containing one or more of the letters (i, m, s, x, q). The flags have the same meaning as in the flags argument of the XPath fn:matches() function; for example saxon:flags="i" causes case-blind regular expression matching.

For example:

<xs:element name="code"> <xs:simpleType> <xs:restriction base="xs:string" xmlns:saxon="http://saxon.sf.net/"> <xs:pattern value="[A-M][1-9]" saxon:flags="i"/> </xs:restriction> </xs:simpleType> </xs:element>

Valid values for the code element include "A3", "J2", and "m5".