XML Schema notation 요소

정의와 사용법

notation 요소는 XML 문서 내의 비 XML 데이터 형식을 설명합니다.

요소 정보

출현 횟수 무제한
부모 요소 schema
내용 annotation

문법

<notation
id=ID
name=NCName
public=anyURI
system=anyURI
다른 속성
>
(annotation?)
</notation>

(? 기호는 notation 요소 내에서 이 요소가 0회나 1회 나타날 수 있습니다。)

속성 설명
id 선택 사항입니다. 요소의 독특한 ID를 지정할 수 있습니다.
name 필수입니다. 요소에 이름을 지정합니다.
public 필수입니다. public 식별자와 일치하는 URI 참조가 필요합니다.
system system 식별자와 일치하는 URI 참조.
다른 속성 선택 사항입니다. 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" 요소는 이렇게 보입니다:

<image type="gif"></image>