عنصر notation في XML Schema
التعريف والاستخدام
يصف element notation العنصر غير XML في وثيقة XML.
معلومات العنصر
مرة | غير محدودة |
العدة | النموذج |
المحتوى | الاشارة الملاحظة |
النحو
<notation id=ID name=NCName public=anyURI system=anyURI خصائص أي > (الاشارة الملاحظة?) </notation>
؟ علامة الاشارة يمكن أن تظهر في notation element صفر مرات أو مرة واحدة.
الخصائص | الوصف |
---|---|
id | اختياري. تحديد ID فريد للعنصر. |
name | مطلوب. تحديد اسم العنصر. |
public | مطلوب. المرجع URI الم相对应 لـ public identifier. |
system | المرجع URI الم相对应 لـ system identifier. |
خصائص أي | اختياري. تحديد أي خصائص أخرى بلا مسمى. |
مثال
مثال 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>