notation ບັນດາບັນນາທິການ XML Schema

ການນຳໃຊ້ ແລະ ການອະທິບາຍ

notation ບັນດາບັນນາທິການ XML ອະທິບາຍຮູບແບບຂອງຂໍ້ມູນທີ່ບໍ່ແມ່ນ XML.

ຂໍ້ມູນສິ່ງມັນ

ຈຳນວນການປະກົດ ບໍ່ມີການຈໍາກັດ
ສິ່ງປົກກະຕິ schema
ຂອບເຂດ annotation

ການອ້າງອີງ

<notation
id=ID
name=NCName
public=anyURI
system=anyURI
ບັນດາລັກສະນະ
>
(annotation?)
</notation>

(-? ບັນດາບັນນາທິການອາດຈະອາດອອກບໍ່ມີຫຼືຫຼຽນກັນໃນບັນດາບັນນາທິການ notation.)

ລັກສະນະ ອະທິບາຍ
id ຄວາມຄິດການ. ກໍານົດ ID ສະນະພາສານສະເພາະສຳລັບບັນດາສິ່ງ.
name ສະເພາະ. ກໍານົດຊື່ສິ່ງມັນສຳລັບບັນດາສິ່ງ.
public ສະເພາະ. URI ທີ່ຕິດຕໍ່ກັບ public ບັນດາບັນນາທິການ.
system URI ທີ່ຕິດຕໍ່ກັບ system ບັນດາບັນນາທິການ.
ບັນດາລັກສະນະ ຄວາມຄິດການ. ກໍານົດບັນດາລັກສະນະອື່ນໆທີ່ມີສານນອກສັນຍາວັດສະດຸ.

ຕົວຢ່າງ

ຄວາມຄິດການ 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>

文档中的 "image" 元素是这样的:

<image type="gif"></image>