عنصر notation XML Schema

تعریف و استفاده

عنصر notation XML را در مورد فرمت داده‌های غیر XML توضیح می‌دهد.

اطلاعات عنصر

تعداد دفعات محدودیت ندارد
عنصر والد schema
محتوای annotation

نحوه‌ی نوشتن

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

؟ نشانه‌ها در element notation می‌توانند صفر یا یک بار ظاهر شوند.

ویژگی‌ها توضیحات
id اختیاری. ID منحصر به فرد عناصر را مشخص می‌کند.
name ضروری. نام عناصر را مشخص می‌کند.
public ضروری. URI مرتبط با شناسه public.
system URI مرتبط با شناسه system.
any attributes اختیاری. هرگونه属性 با نام فضای نام 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>