XML Schema union အအုပ်အဝင်
ဖော်ပြ နှင့် အသုံးပြု
union အအုပ်အဝင် သည် အဆိုပါ simpleType အအုပ်အဝင် ဖြစ်သော အအုပ်အဝင် အမျိုးအစားများ အမျိုးအစားအုပ်အဝင် ကို ဖော်ပြသည်。
အအုပ်အဝင် အခွင့်အရေး
ပေါ်ပေါက်ခြင်း | တစ်ကြိမ် |
အဖွဲ့ဝင် | simpleType |
အကြောင်းအရာ | annotation、simpleType |
အကျိုးသတ္တိ
<union id=ID memberTypes="list of QNames" အခွင့်အရေး > (annotation?,(simpleType*)) </union>
(? အစားအသား အား union အအုပ်အဝင် တွင် အသုံးပြုသည်။ အရာတစ်ခုခု ပါဘဲ သို့မဟုတ် အရာတစ်ခုခု ပါသည်။)
အခွင့်အရေး | ဖော်ပြ |
---|---|
id | အခက်အခဲ အချက်အလက် သတ်မှတ်ထားသော အအုပ်အဝင် ကိုယ်စားပြုသည့် အမည်ကို သတ်မှတ်ရန်。 |
memberTypes | အခက်အခဲ အချက်အလက် အသုံးပြုရန် သတ်မှတ်ထားသော schema တွင် အသုံးပြုသော အဆိုပါ အခွင့်အရေး သို့မဟုတ် simpleType အအုပ်အဝင် အမည်များ စာရင်းကို သတ်မှတ်ရန်。 |
အခွင့်အရေး | အခက်အခဲ အချက်အလက် အသုံးပြုရန် သတ်မှတ်ထားသော non-schema အမည်ရှိ အခြား အခွင့်အရေးများကို အသုံးပြုရန်。 |
အမှတ်
အမှတ် 1
ဤအကြောင်းအရာသည် နှစ်ခုကို ပေါင်းစပ်ထားသော အကင်းအရေးအသားအမျိုးအစားတစ်ခုဖြစ်ပါသည်:
<xs:element name="jeans_size"> <xs:simpleType> <xs:union memberTypes="sizebyno sizebystring" /> </xs:simpleType> </xs:element> <xs:simpleType name="sizebyno"> <xs:restriction base="xs:positiveInteger"> <xs:maxInclusive value="42"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="sizebystring"> <xs:restriction base="xs:string"> <xs:enumeration value="small"/> <xs:enumeration value="medium"/> <xs:enumeration value="large"/> </xs:restriction> </xs:simpleType>