XML ကျူတိုရီရယ်

XML ပင်မစာမျက်နှာ XML နိဒါန်း XML အသုံးပြုပုံ XML သစ်ပင် XML Syntax XML ဒြပ်စင်များ XML အရည်အချင်းများ XML Namespaces XML မျက်နှာပြင် XML Http တောင်းဆိုချက် XML Parser XML DOM XML XPath XML XSLT XML XQuery XML XLink XML စစ်ဆေးခြင်း XML DTD XML Schema XML ဆာဗာ XML နမူနာများ XML Quiz XML လက်မှတ်

XML AJAX

AJAX နိဒါန်း AJAX XMLHttp AJAX တောင်းဆိုချက် AJAX တုံ့ပြန်မှု AJAX XML ဖိုင် AJAX PHP AJAX ASP AJAX ဒေတာဘေ့စ် AJAX အပလီကေးရှင်းများ AJAX ဥပမာများ

XML DOM

DOM နိဒါန်း DOM Nodes DOM အသုံးပြုခြင်း DOM Node အချက်အလက် DOM Node စာရင်း DOM လမ်းလျှောက်ခြင်း။ DOM လမ်းကြောင်းပြခြင်း။ DOM တန်ဖိုးများရယူပါ။ DOM Change Nodes DOM သည် Nodes များကို ဖယ်ရှားပါ။ DOM သည် Nodes များကို အစားထိုးပါ။ DOM သည် Nodes ကိုဖန်တီးပါ။ DOM Add Nodes DOM Clone Nodes DOM ဥပမာများ

XPath ကျူတိုရီရယ်

XPath နိဒါန်း XPath Nodes XPath Syntax XPath Axes XPath အော်ပရေတာများ XPath ဥပမာများ

XSLT ကျူတိုရီရယ်

XSLT မိတ်ဆက် XSL ဘာသာစကားများ XSLT အသွင်ပြောင်း XSLT < template> XSLT <value-of> XSLT <for-every> XSLT <sort> XSLT <if> XSLT <choose> XSLT လျှောက်ထားပါ။ Client ပေါ်ရှိ XSLT ဆာဗာပေါ်ရှိ XSLT XSLT တည်းဖြတ် XML XSLT နမူနာများ

XQuery ကျူတိုရီရယ်

XQuery နိဒါန်း XQuery ဥပမာ XQuery FLWOR XQuery HTML XQuery စည်းမျဥ်းများ XQuery Syntax XQuery Add XQuery ကို ရွေးပါ။ XQuery လုပ်ဆောင်ချက်များ

XML DTD

DTD နိဒါန်း DTD ဆောက်လုပ်ရေးလုပ်ကွက်များ DTD ဒြပ်စင်များ DTD အရည်အချင်းများ DTD ဒြပ်စင်များနှင့် Attr DTD အဖွဲ့အစည်းများ DTD ဥပမာများ

XSD Schema

XSD မိတ်ဆက် XSD လုပ်နည်း XSD <schema> XSD ဒြပ်စင်များ XSD ရည်ညွှန်းချက်များ XSD ကန့်သတ်ချက်များ

XSD Complex

XSD ဒြပ်စင်များ XSD ဗလာ XSD ဒြပ်စင်များသာ XSD စာသားသီးသန့် XSD ရောနှောထားသည်။ XSD အညွှန်းကိန်းများ XSD <any> XSD <anyAttribute> XSD အစားထိုးခြင်း။ XSD ဥပမာ

XSD ဒေတာ

XSD ကြိုး XSD ရက်စွဲ XSD ဂဏန်း XSD ထွေ XSD အကိုးအကား

ဝဘ် ဝန်ဆောင်မှုများ

XML ဝန်ဆောင်မှုများ XML WSDL XML ဆပ်ပြာ XML RDF XML RSS

ကိုးကား

DOM Node အမျိုးအစားများ DOM Node DOM NodeList DOM အမည်ရှိNodeMap DOM စာရွက်စာတမ်း DOM ဒြပ်စင် DOM ရည်ညွှန်းချက် DOM စာသား DOM CDATA DOM မှတ်ချက် DOM XMLHttp တောင်းဆိုချက် DOM Parser XSLT ဒြပ်စင်များ XSLT/XPath လုပ်ဆောင်ချက်များ

XML Schema ရည်ညွှန်းချက် Element


❮ XML Schema ကိုးကားချက် အပြည့်အစုံ

အဓိပ္ပါယ်နှင့် အသုံးပြုမှု

attribute element သည် attribute ကိုသတ်မှတ်သည်။

ဒြပ်စင်အချက်အလက်

  • ပင်မ ဒြပ်စင်များ- attributeGroup၊ schema၊ complexType၊ ကန့်သတ်ချက် (ရိုးရှင်းသောအကြောင်းအရာနှင့် ရှုပ်ထွေးသောအကြောင်းအရာနှစ်ခုလုံး)၊ extension (ရိုးရှင်းသောအကြောင်းအရာနှင့် ရှုပ်ထွေးသောအကြောင်းအရာနှစ်ခုလုံး)

အထားအသို

<attribute
default=string
fixed=string
form=qualified|unqualified
id=ID
name=NCName
ref=QName
type=QName
use=optional|prohibited|required
any attributes
>

(annotation?,(simpleType?))

</attribute>

(အမှတ်အသား ? အမှတ်အသားသည် ဒြပ်စင်အား ရည်ညွှန်းချက်ဒြပ်စင်အတွင်း သုည သို့မဟုတ် တစ်ကြိမ် ဖြစ်ပေါ်နိုင်ကြောင်း ကြေငြာသည်)

Attribute Description
default Optional. Specifies a default value for the attribute. Default and fixed attributes cannot both be present
fixed Optional. Specifies a fixed value for the attribute. Default and fixed attributes cannot both be present
form Optional. Specifies the form for the attribute. The default value is the value of the attributeFormDefault attribute of the element containing the attribute. Can be set to one of the following:
  • "qualified" - indicates that this attribute must be qualified with the namespace prefix and the no-colon-name (NCName) of the attribute
  • unqualified - indicates that this attribute is not required to be qualified with the namespace prefix and is matched against the (NCName) of the attribute
id Optional. Specifies a unique ID for the element
name Optional. Specifies the name of the attribute. Name and ref attributes cannot both be present
ref Optional. Specifies a reference to a named attribute. Name and ref attributes cannot both be present. If ref is present, simpleType element, form, and type cannot be present
type Optional. Specifies a built-in data type or a simple type. The type attribute can only be present when the content does not contain a simpleType element
use Optional. Specifies how the attribute is used. Can be one of the following values:
  • optional - the attribute is optional (this is default)
  • prohibited - the attribute cannot be used
  • required - the attribute is required
any attributes Optional. Specifies any other attributes with non-schema namespace

ဥပမာ ၁

<xs:attribute name="code">

<xs:simpleType>
  <xs:restriction base="xs:string">
    <xs:pattern value="[A-Z][A-Z]"/>
  </xs:restriction>
</xs:simpleType>

</xs:attribute>

အထက်ဖော်ပြပါ ဥပမာသည် "ကုဒ်" ရည်ညွှန်းချက်တွင် ကန့်သတ်ချက်တစ်ခုရှိကြောင်း ဖော်ပြသည်။ လက်ခံနိုင်သော တစ်ခုတည်းသောတန်ဖိုးမှာ a မှ z မှ စာလုံးကြီးနှစ်လုံးဖြစ်သည်။

ဥပမာ ၂

ရှုပ်ထွေးသောအမျိုးအစားတစ်ခုအတွင်း ရှိပြီးသား attribute အဓိပ္ပါယ်ဖွင့်ဆိုချက်ကို အသုံးပြု၍ attribute တစ်ခုကြေငြာရန်၊ ref attribute ကိုသုံးပါ-

<xs:attribute name="code">
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z][A-Z]"/>
    </xs:restriction>
  </xs:simpleType>
</xs:attribute>

<xs:complexType name="someComplexType">
  <xs:attribute ref="code"/>
</xs:complexType>

ဥပမာ ၃

ရည်ညွှန်းချက်များတွင် ပုံသေတန်ဖိုး သို့မဟုတ် ပုံသေသတ်မှတ်ထားသောတန်ဖိုးတစ်ခုရှိနိုင်သည်။ အခြားတန်ဖိုးကို မသတ်မှတ်ထားသောအခါတွင် မူရင်းတန်ဖိုးကို attribute တွင် အလိုအလျောက်သတ်မှတ်ပေးပါသည်။ အောက်ပါဥပမာတွင် မူရင်းတန်ဖိုးမှာ "EN" ဖြစ်သည်-

<xs:attribute name="lang" type="xs:string" default="EN"/>

အခြားတန်ဖိုးကို မသတ်မှတ်ထားသည့်အခါ ပုံသေတန်ဖိုးကိုလည်း attribute တွင် အလိုအလျောက်သတ်မှတ်ပေးပါသည်။ မူရင်းတန်ဖိုးများနှင့် မတူဘဲ၊ ပုံသေထက် အခြားတန်ဖိုးကို သင်သတ်မှတ်ပါက၊ စာရွက်စာတမ်းသည် မမှန်ကန်ဟု ယူဆပါသည်။ အောက်ပါဥပမာတွင် ပုံသေတန်ဖိုးသည် "EN" ဖြစ်သည်-

<xs:attribute name="lang" type="xs:string" fixed="EN"/>

ဥပမာ ၄

ရည်ညွှန်းချက်အားလုံးသည် ပုံမှန်အားဖြင့် ရွေးချယ်နိုင်သည် ရည်ညွှန်းချက်သည် ရွေးချယ်နိုင်သည်ဟု ပြတ်သားစွာ သတ်မှတ်ရန်၊ "အသုံးပြုရန်" အရည်အချင်းကို အသုံးပြုပါ-

<xs:attribute name="lang" type="xs:string" use="optional"/>

ရည်ညွှန်းချက်တစ်ခုပြုလုပ်ရန် လိုအပ်သည်-

<xs:attribute name="lang" type="xs:string" use="required"/>

❮ XML Schema ကိုးကားချက် အပြည့်အစုံ