XML Schema ရွေးချယ်မှု Element
❮ XML Schema ကိုးကားချက် အပြည့်အစုံ
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
XML Schema ရွေးချယ်မှုဒြပ်စင်သည် <choice> ကြေငြာချက်တွင်ပါရှိသော ဒြပ်စင်များထဲမှ တစ်ခုကို ပါဝင်သောဒြပ်စင်အတွင်းတွင် ရှိနေစေရန် ခွင့်ပြုသည်။
ဒြပ်စင်အချက်အလက်
- ပင်မ ဒြပ်စင်များ- အုပ်စု၊ ရွေးချယ်မှု၊ အတွဲလိုက်၊ ရှုပ်ထွေးသောအမျိုးအစား၊ ကန့်သတ်ချက် (ရိုးရှင်းသောအကြောင်းအရာနှင့် ရှုပ်ထွေးသောအကြောင်းအရာနှစ်ခုလုံး)၊ တိုးချဲ့မှု (ရိုးရှင်းသောအကြောင်းအရာနှင့် ရှုပ်ထွေးသောအကြောင်းအရာနှစ်ခုလုံး)
အထားအသို
<choice
id=ID
maxOccurs=nonNegativeInteger|unbounded
minOccurs=nonNegativeInteger
any attributes
>
(annotation?,(element|group|choice|sequence|any)*)
</choice>
( ? အမှတ်အသားသည် ဒြပ်စင်သည် သုည သို့မဟုတ် တစ်ကြိမ် ဖြစ်ပွားနိုင်သည်ဟု ကြေငြာပြီး * သင်္ကေတသည် ရွေးချယ်မှုဒြပ်စင်အတွင်း သုည သို့မဟုတ် ထို့ထက်ပိုသော အကြိမ်များ ဖြစ်ပေါ်နိုင်သည်ဟု ကြေငြာသည်)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
maxOccurs | Optional. Specifies the maximum number of times the choice element can occur in the parent element. The value can be any number >= 0, or if you want to set no limit on the maximum number, use the value "unbounded". Default value is 1 |
minOccurs | Optional. Specifies the minimum number of times the choice element can occur in the parent the element. The value can be any number >= 0. Default value is 1 |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
ဥပမာ
<xs:element name="person">
<xs:complexType>
<xs:choice>
<xs:element name="employee" type="employee"/>
<xs:element name="member" type="member"/>
</xs:choice>
</xs:complexType>
</xs:element>
အထက်ဖော်ပြပါ ဥပမာသည် "ဝန်ထမ်း" ဒြပ်စင် သို့မဟုတ် "အဖွဲ့ဝင်" ဒြပ်စင်ပါ၀င်သော "ပုဂ္ဂိုလ်" အမည်ရှိ ဒြပ်စင်တစ်ခုကို သတ်မှတ်ဖော်ပြပါသည်။
❮ XML Schema ကိုးကားချက် အပြည့်အစုံ