อัลตราเอ็กซ์เมล์ simpleContent

การระบุและการใช้งาน

simpleContent องค์ประกอบมีการขยายหรือจำกัด complexType องค์ประกอบ (ที่มีข้อความหรือ simpleType องค์ประกอบเป็นเนื้อหา) และไม่มีองค์ประกอบใดๆ

ข้อมูลองค์ประกอบ

ความเกิดขึ้น ครั้ง
เอกภาพ complexType
เนื้อหา

ตั้งแต่ใจ — annotation

บังคับใช้ — มีและมีเพียงองค์ประกอบที่ต่อไปนี้เดียว: restriction (simpleContent) หรือ extension (simpleContent)。

วลี

<simpleContent
id=ID
attributes
>
(annotation?,(restriction|extension))
</simpleContent>

(? สัญญาณการปรากฏใน simpleContent อาจมีครั้ง 0 หรือ 1。)

attributes คำอธิบาย
id ตั้งแต่ใจ ระบุ ID ที่เด่นขององค์ประกอบนี้
attributes ตั้งแต่ใจ

ตัวอย่าง

ตัวอย่าง 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>