XML Schema စာရင်း Element
❮ XML Schema အကိုးအကားကို အပြီးသတ်ပါ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
စာရင်းဒြပ်စင်သည် ရိုးရှင်းသော အမျိုးအစားဒြပ်စင်ကို သတ်မှတ်ထားသော ဒေတာအမျိုးအစား၏ တန်ဖိုးများစာရင်းအဖြစ် သတ်မှတ်သည်။
ဒြပ်စင်အချက်အလက်
- ပင်မ ဒြပ်စင်များ- ရိုးရိုးအမျိုးအစား
အထားအသို
<list
id=ID
itemType=QName
any attributes
>
(annotation?,(simpleType?))
</list>
( ? အမှတ်အသားသည် စာရင်းဒြပ်စင်အတွင်း သုည သို့မဟုတ် တစ်ကြိမ် ဖြစ်ပွားနိုင်သည်ဟု ကြေငြာသည်)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
itemType |
Specifies the name of a built-in data type or simpleType element defined in this or another schema. This attribute is not allowed if the content contains a simpleType element, otherwise it is required |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
ဥပမာ ၁
အောက်ပါဥပမာသည် ကိန်းပြည့်များစာရင်းဖြစ်သည့် ရိုးရှင်းသောအမျိုးအစားကို ပြသသည်-
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="intvalues" type="valuelist"/>
<xs:simpleType name="valuelist">
<xs:list itemType="xs:integer"/>
</xs:simpleType>
</xs:schema>
The "intvalues" element in a document could look like this (notice that
the list will have five list items):
<intvalues>100 34 56 -23 1567</intvalues>
မှတ်ချက်- White space ကို စာရင်းအကြောင်းအရာ ခွဲထုတ်ခြင်းအဖြစ် သတ်မှတ်သည်။
ဥပမာ ၂
အောက်ဖော်ပြပါ ဥပမာသည် စာကြောင်းများစာရင်းဖြစ်သည့် ရိုးရှင်းသောအမျိုးအစားကို ပြသသည်-
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="stringvalues" type="valuelist"/>
<xs:simpleType name="valuelist">
<xs:list itemType="xs:string"/>
</xs:simpleType>
</xs:schema>
The "stringvalues" element in a document could look like this (notice
that the list will have four list items):
<stringvalues>I love XML Schema</stringvalues>
❮ XML Schema အကိုးအကားကို အပြီးသတ်ပါ။