عناصر تدوين مخطط XML
تعريف واستخدام
عناصر تدوين تصف وثيقة XML تنسيق البيانات XML في وسط أفريقيا.
معلومات عنصر
- العنصر الأصلي: مخطط
قواعد
<notation
id=ID
name=NCName
public=anyURI
system=anyURI
any attributes
>
(annotation?)
</notation>
id=ID
name=NCName
public=anyURI
system=anyURI
any attributes
>
(annotation?)
</notation>
(؟ تسجيل يعلن أن تدوين العناصر في عنصر يمكن أن يحدث صفر أو واحد آخر).
属性 | 描述 |
---|---|
id | 可选。规定该元素的唯一的 ID。 |
name | 必需。为元素规定名称。 |
public | 必需。与 public 标识符相对应的 URI 引用。 |
system | 与 system 标识符相对应的 URI 引用。 |
any attributes | 可选。规定带有 non-schema 命名空间的任何其他属性。 |
مثال 1
المثال التالي من خلال استخدام تطبيق عرض لعرض view.exe اف تدوين و 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>
<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>
XML كامل مخطط المرجعي