XML Schema notation element
Definition and Usage
Ang notation element ng XML Schema ay naglalarawan ng format ng hindi XML data sa dokumentong XML.
Element Information
Occurrence | Unlimited |
Parent Element | schema |
Content | annotation |
Grammar
<notation id=ID name=NCName public=anyURI system=anyURI anumang attributes > (annotation?) </notation>
(? Ang symbol ay maaring lumagay sa notation elementa nang walang beses o isang beses lamang。)
Attribute | Description |
---|---|
id | Opsiyonal. I-set ang nag-iisang ID ng elemento. |
name | Mandahil. I-set ang pangalan ng elemento. |
public | Mandahil. URI reference na tumutugma sa public identifier. |
system | URI reference na tumutugma sa system identifier. |
anumang attributes | Opsiyonal. I-set ang kahit anong iba pang attribute na may non-schema na pangalan ng namespace. |
Eksemplo
Halimbawa 1
Ang halimbawa sa ibang eksemplo ay nagamit ng isang programang tinitignan view.exe upang ipakita ang format na gif at jpeg ng notation:
<?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>
Ang "image" element sa dokumento ay gaya ng ito:
<image type="gif"></image>