XML-skema- notasie -element
❮ Voltooi XML-skemaverwysing
Definisie en gebruik
Die notasie-element beskryf die formaat van nie-XML-data binne 'n XML-dokument.
Elementinligting
- Ouerelemente: skema
Sintaksis
<notation
id=ID
name=NCName
public=anyURI
system=anyURI
any attributes
>
(annotation?)
</notation>
(Die ? teken verklaar dat die element nul of een keer binne die notasie-element kan voorkom)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
name | Required. Specifies a name for the element |
public | Required. Specifies a URI corresponding to the public identifier |
system |
Optional. Specifies a URI corresponding to the system identifier |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
Voorbeeld 1
Die volgende voorbeeld wys 'n gif- en 'n jpeg-notasie met behulp van 'n kyker-toepassing, view.exe:
<?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>
The "image" element in a document could look like this:
<image type="gif"></image>
❮ Voltooi XML-skemaverwysing