次の方法で共有


annotation

注釈を定義します。

<annotation
  id = ID 
  {any attributes with non-schema Namespace}...>
Content: (appinfo | documentation)*
</annotation>

属性

  • id
    この要素の ID。id の値は ID 型である必要があり、この要素を含んでいるドキュメント内で一意である必要があります。

    省略可能です。

要素情報

出現回数 親要素内で 1 回。
親要素 任意の要素。
コンテンツ appinfodocumentation

解説

注釈には appinfo 要素 (アプリケーションで使用される情報) や documentation 要素 (ユーザーが読んだり使用したりするコメントまたはテキスト) を含めることができます。

annotation 要素と documentation 要素を使用して、単純型およびその定義を構成する列挙体を記述する例を次に示します。

<xs:simpleType name="northwestStates">
    <xs:annotation>
        <xs:documentation>States in the Pacific Northwest of US
</xs:documentation>
    </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value='WA'>
      <xs:annotation>
        <xs:documentation>Washington</xs:documentation>
      </xs:annotation>
    </xs:enumeration>
    <xs:enumeration value='OR'/>
      <xs:annotation>
        <xs:documentation>Oregon</xs:documentation>
      </xs:annotation>
    </xs:enumeration>
    <xs:enumeration value='ID'/>
      <xs:annotation>
        <xs:documentation>Idaho</xs:documentation>
      </xs:annotation>
    </xs:enumeration>
  </xs:restriction>
</xs:simpleType>

参照

XML スキーマ リファレンス (XSD) | XML スキーマの要素

詳細については、http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation で、W3C『XML Schema Part 1: Structures Recommendation』を参照してください。