XML Schema ရှုပ်ထွေးသောအကြောင်းအရာ ဒြပ်စင်
❮ XML Schema အကိုးအကားကို အပြီးသတ်ပါ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ရှုပ်ထွေးသောအကြောင်းအရာဒြပ်စင်သည် ရောနှောပါဝင်သည့်အကြောင်းအရာ သို့မဟုတ် ဒြပ်စင်များသာပါရှိသော ရှုပ်ထွေးသောအမျိုးအစားတွင် တိုးချဲ့မှုများ သို့မဟုတ် ကန့်သတ်ချက်များကို သတ်မှတ်သည်။
ဒြပ်စင်အချက်အလက်
- ပင်မ ဒြပ်စင်များ- ရှုပ်ထွေးသောအမျိုးအစား
အထားအသို
<complexContent
id=ID
mixed=true|false
any attributes
>
(annotation?,(restriction|extension))
</complexContent>
( ? သင်္ကေတသည် ရှုပ်ထွေးသောအကြောင်းအရာဒြပ်စင်အတွင်း သုည သို့မဟုတ် တစ်ကြိမ် ဖြစ်ပေါ်နိုင်သည်ဟု ကြေငြာသည်)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
mixed | Optional. Specifies whether character data is allowed to appear between the child elements of this complexType element. Default is false |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
ဥပမာ ၁
အောက်ပါဥပမာတွင် ရှုပ်ထွေးသောအမျိုးအစား၊ "fullersoninfo" တွင် အမွေဆက်ခံထားသောအမျိုးအစားကို ထပ်လောင်းဖြည့်စွက်ပါဝင်သည့် အစိတ်အပိုင်းသုံးခု (လိပ်စာ၊ မြို့နှင့် နိုင်ငံ) ဖြင့် တိုးချဲ့ခြင်းဖြင့် အခြားရှုပ်ထွေးသောအမျိုးအစား "personinfo" မှဆင်းသက်လာပါသည်။
<xs:element name="employee" type="fullpersoninfo"/>
<xs:complexType name="personinfo">
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="fullpersoninfo">
<xs:complexContent>
<xs:extension base="personinfo">
<xs:sequence>
<xs:element name="address" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="country" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
အထက်နမူနာတွင် "ဝန်ထမ်း" ဒြပ်စင်တွင်၊ အစီအစဥ်အရ အောက်ပါဒြပ်စင်များ ပါဝင်ရမည်- "firstname", "lastname", "address", "city" နှင့် "country" ။
❮ XML Schema အကိုးအကားကို အပြီးသတ်ပါ။