XML Schema simpleContent మూలకం

నిర్వచనం మరియు వినియోగం

simpleContent మూలకం complexType మూలకాన్ని (ఇది అక్షర సమాచారం లేదా simpleType మూలకాన్ని విషయంగా కలిగి ఉంటుంది) విస్తరణను లేదా పరిమితిని కలిగి ఉంటుంది మరియు ఏ మూలకాన్ని కూడా కలిగి లేదు.

మూలకం సమాచారం

ప్రకారం ఒకసారి
మూల మూలకం complexType
విషయం

ఎంపికాత్మకం — annotation

అత్యంత అవసరమైన విభాగం — కేవలం క్రింది విభాగాలలో ఒకటి ఉంటుంది: restriction (simpleContent) లేదా extension (simpleContent).

సంకేతం

<simpleContent
id=ID
ఏ అంశాలు
>
(annotation?,(restriction|extension))
</simpleContent>

(? సంకేతం simpleContent మూలకంలో ఈ మూలకం ప్రారంభం లేదా ఒకసారి కేవలం ఉంటుంది。)

అంశం వివరణ
id ఎంపికాత్మకం. ఈ మూలకంకు ప్రత్యేకమైన ID నిర్వచించండి.
ఏ అంశాలు ఎంపికాత్మకం. నాణ్యతా స్కీమా నామకం కలిగిన ఏ ఇతర అంశాలను నిర్వచించండి.

ప్రకారం

ఉదాహరణ 1

ఇది మాత్రమే పద్యం కలిగిన XML మూలకం (<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>