Is there a better way to do the following?
<xs:restriction base="xs:string">
<xs:pattern value="hulu|Hulu|netflix|Netflix"></xs:pattern>
</xs:restriction>
Basically I want a case-insensitive match on the word.
答案 0 :(得分:5)
XML Schema (XSD) does not provide a case-insensitive matching mode for its facet regular expressions. You can simply match both cases explicitly:
<xs:restriction base="xs:string">
<xs:pattern value="[Hh][Uu][Ll][Uu]"/>
<xs:pattern value="[Nn][Ee][Tt][Ff][Ll][Ii][Xx]"/>
</xs:restriction>
答案 1 :(得分:0)
You could do [Hh]ulu|[Nn]etflix