एक्सएमएल स्कीमा सरल सामग्री तत्व
❮ पूर्ण XML स्कीमा संदर्भ
परिभाषा और उपयोग
simpleContent तत्व में केवल-पाठ जटिल प्रकार या सामग्री के रूप में एक साधारण प्रकार पर एक्सटेंशन या प्रतिबंध होते हैं और इसमें कोई तत्व नहीं होता है।
तत्व जानकारी
- मूल तत्व: जटिल प्रकार
वाक्य - विन्यास
<simpleContent
id=ID
any attributes
>
(annotation?,(restriction|extension))
</simpleContent>
(चिह्न घोषित करता है कि तत्व सरल सामग्री तत्व के अंदर शून्य या एक बार हो सकता है)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
उदाहरण 1
यहाँ एक XML तत्व का उदाहरण दिया गया है (<shoesize>) जिसमें केवल-पाठ शामिल है:
<shoesize country="france">35</shoesize>
निम्नलिखित उदाहरण एक जटिल प्रकार, "जूता आकार" घोषित करता है, इसकी सामग्री को एक पूर्णांक डेटा प्रकार के रूप में परिभाषित किया गया है और एक देश विशेषता के साथ:
<xs:element name="shoesize">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="country" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
❮ पूर्ण XML स्कीमा संदर्भ