XML スキーマ notation 要素
完全なXMLスキーマリファレンス
定義と用法
notation 要素は、XML 文書内の非XMLデータのフォーマットを記述します。
要素情報
構文
<notation
id=ID
name=NCName
public=anyURI
system=anyURI
any attributes
>
(annotation?)
</notation>
(notation 要素内で、? 記号は要素が 0 または 1 回出現できることを宣言します)
属性 |
説明 |
id |
オプション。 要素へユニークな ID を指定する |
name |
必須。要素の名前を指定する |
public |
必須。>public 識別子に対応する URI を指定する |
system |
オプション。system 識別子に対応する URI を指定する
|
any attributes |
オプション。非スキーマ名前空間を持つ他の属性を指定する
|
例 1
次の例は、ビューア・アプリケーションの View.exe を使用して、gif および JPEG の 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>
文書の "image" 要素は、次のようになります:
<image type="gif"></image>
完全なXMLスキーマリファレンス
|