XML Şeması simpleContent Öğesi
❮ Eksiksiz XML Şeması Referansı
Tanım ve Kullanım
simpleContent öğesi, yalnızca metin içeren karmaşık türde veya içerik olarak basit bir türde uzantılar veya kısıtlamalar içerir ve hiçbir öğe içermez.
Eleman Bilgileri
- Ana öğeler: ComplexType
Sözdizimi
<simpleContent
id=ID
any attributes
>
(annotation?,(restriction|extension))
</simpleContent>
(? işareti, öğenin simpleContent öğesi içinde sıfır veya bir kez oluşabileceğini bildirir)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
örnek 1
Burada salt metin içeren bir XML öğesi (<shoesize>) örneği verilmiştir:
<shoesize country="france">35</shoesize>
Aşağıdaki örnek, içeriği bir tamsayı veri türü olarak tanımlanmış ve bir ülke özniteliği ile bir ComplexType, "shoesize" bildirir:
<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>
❮ Eksiksiz XML Şeması Referansı