Elemen notation XML Schema

Definisi dan penggunaan

Elemen notation menggambarkan format data non-XML dalam dokumen XML.

Informasi elemen

Kali muncul Tidak terbatas
Elemen induk Schema
Konten annotation

Tata bahaso

<notation
id=ID
name=NCName
public=anyURI
system=anyURI
attributes
>
(annotation?)
</notation>

Simbol (? ) dinyatakan dalam elemen notation dapat muncul nol atau satu kali.

Properti Deskripsi
id Pilihan. Tentukan ID unik elemen ini.
name Wajib. Tentukan nama elemen.
public Wajib. Referensi URI yang sejalan dengan penanda public.
system Referensi URI yang sejalan dengan penanda system.
attributes Pilihan. Tentukan properti lain yang memiliki ruang nama non-schema.

Contoh

Contoh 1

Contoh di bawah ini menggunakan aplikasi penilikkan view.exe untuk menampilkan notation format gif dan 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>