XML Schema notation要素


XML Schema 参考手册完全な XML Schema リファレンスマニュアル

定義と使い方

notation 要素は、XML ドキュメント内の非 XML データの形式を記述します。

要素情報

  • 親要素: schema

構文

<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 任意。non-schema 名前空間を持つその他の属性を指定します。

実例 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" 要素は次のようになります:



XML Schema 参考手册完全な XML Schema リファレンスマニュアル その他の拡張