XML Schema ရည်ညွှန်းချက် Group Element
❮ XML Schema အကိုးအကားကို အပြီးသတ်ပါ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
attributeGroup အစိတ်အပိုင်းအား attribute ကြေငြာချက်များအစုအဝေးကို အုပ်စုတစ်စုအဖြစ် ရှုပ်ထွေးသောအမျိုးအစား အဓိပ္ပါယ်ဖွင့်ဆိုချက်များအဖြစ် ထည့်သွင်းနိုင်စေရန် အသုံးပြုပါသည်။
ဒြပ်စင်အချက်အလက်
- ပင်မ ဒြပ်စင်များ- attributeGroup၊ ရှုပ်ထွေးသောအမျိုးအစား၊ schema၊ ကန့်သတ်ချက် (ရိုးရှင်းသောအကြောင်းအရာနှင့် ရှုပ်ထွေးသောအကြောင်းအရာနှစ်ခုလုံး)၊ တိုးချဲ့မှု (ရိုးရှင်းသောအကြောင်းအရာနှင့် ရှုပ်ထွေးသောအကြောင်းအရာနှစ်ခုလုံး)
အထားအသို
<attributeGroup
id=ID
name=NCName
ref=QName
any attributes
>
(annotation?),((attribute|attributeGroup)*,anyAttribute?))
</attributeGroup>
( ? နိမိတ်သည် ဒြပ်စင်သည် သုည သို့မဟုတ် တစ်ကြိမ် ဖြစ်ပွားနိုင်သည်ဟု ကြေငြာပြီး * သင်္ကေတသည် attributeGroup ဒြပ်စင်အတွင်း သုည သို့မဟုတ် ထို့ထက်ပိုသောအကြိမ်များ ဖြစ်ပွားနိုင်သည်ဟု ကြေငြာသည်)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
name | Optional. Specifies the name of the attribute group. Name and ref attributes cannot both be present |
ref | Optional. Specifies a reference to a named attribute group. Name and ref attributes cannot both be present |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
ဥပမာ ၁
<xs:attributeGroup name="personattr">
<xs:attribute name="attr1" type="string"/>
<xs:attribute name="attr2" type="integer"/>
</xs:attributeGroup>
<xs:complexType name="person">
<xs:attributeGroup ref="personattr"/>
</xs:complexType>
အထက်ဖော်ပြပါ ဥပမာသည် "personattr" ဟုခေါ်သော အရည်အချင်းအုပ်စုတစ်စုကို "person" ဟု အမည်ပေးထားသည့် ရှုပ်ထွေးသောအမျိုးအစားတွင် အသုံးပြုထားသည်။
❮ XML Schema အကိုးအကားကို အပြီးသတ်ပါ။