XML Schema attributeGroup ປະກອບມີ
ການສະແດງການ ແລະ ການນໍາໃຊ້
attributeGroup ປະກອບມີການຄວາມຮ່ວມປະກອບການປະກອບປະກອບທີ່ມີບັນຊີ, ທີ່ສາມາດປະກອບປະກອບນີ້ເຂົ້າໃນປະເພດຂະໂນມັດ.
ຂໍ້ມູນປະກອບມີດີ
ຈຳນວນການເກີດຂຶ້ນ | ບໍ່ມີຂໍ້ຈຳກັດ |
ປະກອບປະກອບຜູ້ອອກແບບ | attributeGroup、complexType、schema、restriction (simpleContent)、extension (simpleContent)、restriction (complexContent)、extension (complexContent) |
ຂໍ້ມູນ | annotation、attribute、attributeGroup、anyAttribute |
ວິທີການ
<attributeGroup id=ID name=NCName ref=QName any attributes > (annotation?),((attribute|attributeGroup)*,anyAttribute?)) </attributeGroup>
(? ສັນຍາບັນທຶກໃນ ປະກອບ attributeGroup, ປະກອບສາມາດເກີດຂຶ້ນບໍ່ມີຫນັງ ຫລື ໜຶ່ງຄັ້ງ, * ສັນຍາບັນທຶກປະກອບສາມາດເກີດຂຶ້ນບໍ່ມີຫນັງ ຫລື ຫຼາຍຫນັງ. )
ປະກອບ | ການອະທິບາຍ |
---|---|
id | ຄວາມຄິດຫວັງ. ກໍານົດ ID ສະຖິຕິຂອງປະກອບນີ້. |
name | ຄວາມຄິດຫວັງ. ກໍານົດຊື່ຂອງປະກອບທີ່ກໍານົດຫນັງ. name ແລະ ref ບໍ່ສາມາດເກີດຂຶ້ນພ້ອມກັນ. |
ref | ຄວາມຄິດຫວັງ. ກໍານົດການຫາປະກອບທີ່ກໍານົດຫນັງ. name ແລະ ref ບໍ່ສາມາດເກີດຂຶ້ນພ້ອມກັນ. |
any attributes | ຄວາມຄິດຫວັງ. ກໍານົດປະກອບປະກອບທີ່ມີບັນຊີບໍ່ໄດ້ມີສັນຍາສັ່ງສັນຍາ. |
ບົດສະຫຼຸບ
<xs:attributeGroup name="personattr"> <xs:attribute name="attr1" type="string"/> <xs:attribute name="attr2" type="integer"/> </xs:attributeGroup> <xs:complexType name="person"> <xs:attributeGroup ref="personattr"/> </xs:complexType>
ຕົວຢ່າງທີ່ກໍານົດຂອງ ແກ້ວປະສົມ "personattr" ທີ່ນຳໃຊ້ໃນປະເພດຂະໂມສະດຸ "person".