XML Schema notation element
ການອະທິບາຍ ແລະ ການນໍາໃຊ້
notation element ອະທິບາຍຮູບແບບຂອງຂໍ້ມູນບໍ່ແມ່ນ XML ໃນເອກະສານ XML.
ຂໍ້ມູນປະກາດ
ຈຳການປະກາດ | ບໍ່ມີຂໍ້ຈຳກັດ |
ປະກອບສອງສາມປະກາດ | schema |
ຂອບເຂດ | annotation |
ວິທະຍາສາດ
<notation id=ID name=NCName public=anyURI system=anyURI any attributes > (annotation?) </notation>
notation? ປະກອບຢູ່ໃນປະກາດ notation.
ຂໍ້ມູນ | ການອະທິບາຍ |
---|---|
id | ທົດລອງ. ກໍານົດ ID ສະນັບການສະເພາະຂອງປະກາດ. |
name | ຈຳເປັນ. ກໍານົດຊື່ຂອງປະກາດ. |
public | ຈຳເປັນ. URI ທີ່ຕິດຕາມໄອກະສານ public. |
system | URI ທີ່ຕິດຕາມໄອກະສານ system. |
any attributes | ທົດລອງ. ກໍານົດປະເພດຂອງບັນດາປະກາດບໍ່ມີນອກຂອງ schema. |
ຄວາມຄິດ
ຄູ່ມູນ 1
ການຕາມຕົວຢ່າງດັ່ງກ່າວໄດ້ໃຊ້ການສະແດງຄວາມຄິດຂອງຄວາມຄິດ view.exe ເພື່ອສະແດງຮູບພາບຮູບຮ້ອງ gif ແລະ jpeg:
<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:notation name="gif" public="image/gif" system="view.exe"/> <xs:notation name="jpeg" public="image/jpeg" system="view.exe"/> <xs:element name="image"> <xs:complexType> <xs:simpleContent> <xs:attribute name="type"> <xs:simpleType> <xs:restriction base="xs:NOTATION"> <xs:enumeration value="gif"/> <xs:enumeration value="jpeg"/> <xs:restriction> </xs:simpleType> </xs:attribute> </xs:simpleContent> </xs:complexType> </xs:element> </xs:schema>
The "image" element in the document is like this:
<image type="gif"></image>