Xsd XML模式限制
我需要满足以下条件的模式限制: 位置列表,前缀为+或–并用空格字符分隔 Ex:+Z*1+FR–标准杆 可能的位置类型: 面积:Z*1,Z*2,Z*3 ATPCo区域:3个数字 国家:2个字母 城市:3个字母 州/省:2阿尔法/2阿尔法 区域:从1到5的5个字母或4个字母+1个数字 IATA分区:2个数字Xsd XML模式限制,xsd,Xsd,我需要满足以下条件的模式限制: 位置列表,前缀为+或–并用空格字符分隔 Ex:+Z*1+FR–标准杆 可能的位置类型: 面积:Z*1,Z*2,Z*3 ATPCo区域:3个数字 国家:2个字母 城市:3个字母 州/省:2阿尔法/2阿尔法 区域:从1到5的5个字母或4个字母+1个数字 IATA分区:2个数字 xsd列表类型允许使用空格分隔项目。以下内容将允许所有文字: <simpleType name='locations'> <list itemType='string'/
xsd列表类型允许使用空格分隔项目。以下内容将允许所有文字:
<simpleType name='locations'>
<list itemType='string'/>
</simpleType>
可以使用正则表达式将所有字符串限制为以+或开头-
<simpleType name='location'>
<restriction base='string'>
<pattern value='[\+\-]\w'/>
</restriction>
</simpleType>
<simpleType name='locations'>
<list itemType='location'/>
</simpleType>