عنصر 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.
ویژگی‌های هر اختیاری. تعیین هرگونه ویژگی دیگر با نام فضای نام non-schema.

مثال

مثال 1

این مثال از طریق استفاده از یک برنامه مشاهده view.exe برای نمایش notation با فرمت 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>