XML Schema list element

ຄວາມຄິດ

list ບັນດາບັນທຶກຈະກໍານົດການກັບວິທະຍາສານພື້ນຖານຫຼື simpleType.

ບັນດາບັນທຶກນັ້ນຈະກໍານົດວິທະຍາສານພື້ນຖານຫຼື simpleType ທີ່ມີຈຸດຈາກວິທະຍາສານພື້ນຖານຫຼື simpleType.

ຂໍ້ມູນບັນດາບັນທຶກ

ຄວາມຄິດ ຄວາມຄິດ
ສາຍພັນ simpleType
ຄວາມຄິດ annotation、simpleType

ຄວາມຄິດ

<list
id=ID 
itemType=QName 
any attributes
>
(annotation?,(simpleType?))
</list>

(? ຄວາມຄິດສະນັບພາດສະແດງໃນບັນດາບັນທຶກ list ອາດອາດບໍ່ມີຫຼືມີຫຼຽນ.)

ບັນດາບັນທຶກ ຄວາມຄິດ
id ຄວາມຄິດ: ການປະກອບບັນດາບັນທຶກທີ່ມີອັນດັບບໍ່ໄດ້ພິມຂຶ້ນ.
itemType ຊື່ວິທະຍາສານພື້ນຖານຫຼື simpleType ທີ່ຖືກກໍານົດໃນ schema (ຫຼື schema ອື່ນໆທີ່ກໍານົດໂດຍນາມອາການ) ສຳລັບວິທະຍາສານພື້ນຖານຫຼື simpleType. simpleType ທີ່ມີອັນດັບ list ແມ່ນມີຈຸດຂອງວິທະຍາສານພື້ນຖານຫຼື simpleType ທີ່ມີຈຸດຈາກວິທະຍາສານພື້ນຖານຫຼື simpleType.ວິທະຍາສານພື້ນຖານຫຼື simpleType ທີ່ມີຈຸດຈາກ simpleType ບໍ່ອາດມີອັນດັບນັ້ນ, ຖ້າມີ simpleType ບໍ່ມີອັນດັບນັ້ນແມ່ນຖືກຕ້ອງ.
any attributes ຄວາມຄິດ: ການປະກອບບັນດາບັນທຶກທີ່ມີອັນດັບບໍ່ໄດ້ພິມຂຶ້ນ.

ຄວາມຄິດຂອງບັນດາບັນທຶກ.

ຄວາມຄິດ 1

ຄວາມຄິດຂອງພິມຂຶ້ນຈະສະແດງວ່າຂັ້ນຕອນຂອງບາດສະແດງຄຳກ່າວຄືນນັ້ນ:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="intvalues" type="valuelist">
<xs:simpleType name="valuelist">
  <xs:list itemType="xs:integer"/>
</xs:simpleType>
</xs:schema>

ຂໍ້ມູນ "intvalues" ໃນເອກະສານມີຄວາມຄືກັນນີ້ (ຄິດວ່າບັນດາບັນທຶກມີຫ້າບັນທຶກ):

<intvalues>100 34 56 -23 1567</intvalues>

ຄວາມຄິດ:ຈຸດນອກນັ້ນແມ່ນການແຍກບັນດາບັນທຶກ.

ຄວາມຄິດ 2

ຄວາມຄິດຂອງພິມຂຶ້ນຈະສະແດງວ່າຂັ້ນຕອນຂອງບາດສະແດງຄຳກ່າວຄືນນັ້ນ:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="stringvalues" type="valuelist">
<xs:simpleType name="valuelist">
  <xs:list itemType="xs:string"/>
</xs:simpleType>
</xs:schema>

The "stringvalues" element in the document is similar to this (note that this list has four list items):

<stringvalues>I love XML Schema</stringvalues>