XSD String Data အမျိုးအစားများ
စာလုံးကြိုးများပါရှိသော တန်ဖိုးများအတွက် ဒေတာအမျိုးအစားများကို အသုံးပြုပါသည်။
String Data အမျိုးအစား
string data အမျိုးအစားတွင် စာလုံးများ၊ စာကြောင်းဖိဒ်များ၊ carriage returns နှင့် တက်ဘ်ဇာတ်ကောင်များ ပါဝင်နိုင်သည်။
အောက်ပါသည် အစီအစဉ်တစ်ခုရှိ string ကြေငြာခြင်း၏ ဥပမာတစ်ခုဖြစ်သည်။
<xs:element name="customer" type="xs:string"/>
သင့်စာရွက်စာတမ်းရှိ အစိတ်အပိုင်းတစ်ခုသည် ဤကဲ့သို့ဖြစ်နိုင်သည်-
<customer>John Smith</customer>
သို့မဟုတ် ၎င်းသည် ဤကဲ့သို့ဖြစ်နိုင်သည်-
<customer> John Smith </customer>
မှတ်ချက်- သင် string data အမျိုးအစားကို အသုံးပြုပါက XML ပရိုဆက်ဆာသည် တန်ဖိုးကို ပြောင်းလဲမည်မဟုတ်ပါ။
NormalizedString Data အမျိုးအစား
normalizedString data type သည် String data type မှ ဆင်းသက်လာသည်။
normalizedString ဒေတာအမျိုးအစားတွင် ဇာတ်ကောင်များပါ၀င်သော်လည်း XML ပရိုဆက်ဆာသည် စာကြောင်းဖိဒ်များ၊ carriage returns နှင့် တက်ဘ်ဇာတ်ကောင်များကို ဖယ်ရှားပေးမည်ဖြစ်သည်။
အောက်ပါသည် schema တစ်ခုရှိ normalizedString ကြေငြာချက်၏ ဥပမာတစ်ခုဖြစ်သည်။
<xs:element name="customer" type="xs:normalizedString"/>
သင့်စာရွက်စာတမ်းရှိ အစိတ်အပိုင်းတစ်ခုသည် ဤကဲ့သို့ဖြစ်နိုင်သည်-
<customer>John Smith</customer>
သို့မဟုတ် ၎င်းသည် ဤကဲ့သို့ဖြစ်နိုင်သည်-
<customer> John Smith </customer>
မှတ်ချက်- XML ပရိုဆက်ဆာသည် အထက်နမူနာတွင် တက်ဘ်များကို နေရာလွတ်များဖြင့် အစားထိုးမည်ဖြစ်သည်။
Token Data အမျိုးအစား
တိုကင်ဒေတာအမျိုးအစားကိုလည်း String ဒေတာအမျိုးအစားမှ ဆင်းသက်လာသည်။
တိုကင်ဒေတာအမျိုးအစားတွင် အက္ခရာများပါရှိသည်၊ သို့သော် XML ပရိုဆက်ဆာသည် စာကြောင်းဖိဒ်များ၊ လှည်းပြန်ပို့မှုများ၊ တဘ်များ၊ ရှေ့သွားနှင့် နောက်လိုက်နေရာများနှင့် နေရာအများအပြားကို ဖယ်ရှားပေးမည်ဖြစ်သည်။
အောက်ဖော်ပြပါသည် အစီအစဉ်တစ်ခုရှိ တိုကင်ကြေညာခြင်း၏ ဥပမာတစ်ခုဖြစ်သည်။
<xs:element name="customer" type="xs:token"/>
သင့်စာရွက်စာတမ်းရှိ အစိတ်အပိုင်းတစ်ခုသည် ဤကဲ့သို့ဖြစ်နိုင်သည်-
<customer>John Smith</customer>
သို့မဟုတ် ၎င်းသည် ဤကဲ့သို့ဖြစ်နိုင်သည်-
<customer> John Smith </customer>
မှတ်ချက်- XML ပရိုဆက်ဆာအထက် ဥပမာတွင် တက်ဘ်များကို ဖယ်ရှားပါမည်။
String Data အမျိုးအစားများ
အောက်ဖော်ပြပါ ဒေတာအမျိုးအစားအားလုံးသည် String ဒေတာအမျိုးအစား (string ကိုယ်တိုင်မှလွဲ၍) မှ ဆင်းသက်လာကြောင်း သတိပြုပါ။
Name | Description |
---|---|
ENTITIES | |
ENTITY | |
ID | A string that represents the ID attribute in XML (only used with schema attributes) |
IDREF | A string that represents the IDREF attribute in XML (only used with schema attributes) |
IDREFS | |
language | A string that contains a valid language id |
Name | A string that contains a valid XML name |
NCName | |
NMTOKEN | A string that represents the NMTOKEN attribute in XML (only used with schema attributes) |
NMTOKENS | |
normalizedString | A string that does not contain line feeds, carriage returns, or tabs |
QName | |
string | A string |
token | A string that does not contain line feeds, carriage returns, tabs, leading or trailing spaces, or multiple spaces |
String Data အမျိုးအစားများအပေါ် ကန့်သတ်ချက်များ
String ဒေတာအမျိုးအစားများနှင့် အသုံးပြုနိုင်သည့် ကန့်သတ်ချက်များ-
- စာရင်းကောက်ခြင်း။
- အရှည်
- အများဆုံးအရှည်
- မိနစ်အလျား
- ပုံစံ (NMTOKENS၊ IDREFS နှင့် ENTITIES များသည် ဤကန့်သတ်ချက်ကို အသုံးမပြုနိုင်ပါ)
- အာကာသ