XML Schema simpleContent एलीमेंट

वर्णन और उपयोग

simpleContent एलीमेंट complexType एलीमेंट (जो अक्षर डाटा या simpleType एलीमेंट के रूप में सामग्री है) के विस्तार या प्रतिबंध को शामिल करता है और कोई एलीमेंट नहीं है।

एलीमेंट जानकारी

प्रदर्शन बार एक बार
पैरेंट एलीमेंट complexType
विषय

वैकल्पिक विकल्प — annotation

अनिवार्य विकल्प — निम्नलिखित एलीमेंटों में से एक होगा: restriction (simpleContent) या extension (simpleContent)。

व्याकरण

<simpleContent
id=ID
कोई गुण
>
(annotation?,(restriction|extension))
</simpleContent>

(? सूचकक एक simpleContent एलीमेंट में इस एलीमेंट को शून्य या एक बार ही दिखाएगा。)

गुण वर्णन
id वैकल्पिक। इस एलीमेंट के अकेला आईडी निर्दिष्ट करें।
कोई गुण वैकल्पिक। नॉन-स्केमा नामस्पेक्ट्रम के साथ किसी अन्य गुण को निर्दिष्ट करें।

उदाहरण

उदाहरण 1

यह तक्रार लेखात्मक एक्सएमएल एलीमेंट है (<shoesize>):

<shoesize country="france">35</shoesize>

नीचे का उदाहरण एक कॉम्पोजिट टाइप "shoesize" की घोषणा करता है जिसकी सामग्री गणितीय डेटा टाइप द्वारा परिभाषित है और एक country अट्रिब्यूट के साथ है:}

<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>