【单选题】
union类型:假设Schema的名字空间前缀为“xsd”,现在需要定义名为“contactType”的简单类型,要求取值为"phoneType"类型或“emailType”类型,下面正确的选项是()。
①
xsd:simpleTypename="contactType"xsd:unionunionType="phoneType"//xsd:simpleType
②
xsd:simpleTypename="contactType"xsd:unionunionType="phoneTypeemailType"//xsd:simpleType
③
xsd:simpleTypename="contactType"xsd:unionmemberType="phoneType"//xsd:simpleType
④
xsd:simpleTypename="contactType"xsd:unionmemberType="phoneTypeemailType"//xsd:simpleType
【多选题】
模式限制:假设Schema的名字空间前缀为“xsd”,现在需要定义名为“phoneType”的简单类型,在“string”类型的基础上增加模式限制,要求是手机号码,下面正确的选项是()。
①
xsd:simpleTypename="phoneType"xsd:restrictionbase="xsd:string"xsd:patternvalue="[0,9]{11}"//xsd:restriction/xsd:simpleType
②
xsd:simpleTypename="phoneType"xsd:restrictionbase="xsd:string"xsd:patternvalue="[0,9]{11}+"//xsd:restriction/xsd:simpleType
③
xsd:simpleTypename="phoneType"xsd:restrictionbase="xsd:string"xsd:patternvalue="[0,9]{11}?"//xsd:restriction/xsd:simpleType
④
xsd:simpleTypename="phoneType"xsd:restrictionbase="xsd:string"xsd:patternvalue="[0-9]{11}"//xsd:restriction/xsd:simpleType