XML 스키마 모든 요소
❮ 완전한 XML 스키마 참조
정의 및 사용
any 요소를 사용하면 작성자가 스키마에서 지정하지 않은 요소로 XML 문서를 확장할 수 있습니다.
요소 정보
- 상위 요소: 선택, 시퀀스
통사론
<any
id=ID
maxOccurs=nonNegativeInteger|unbounded
minOccurs=nonNegativeInteger
namespace=namespace
processContents=lax|skip|strict
any attributes
>
(annotation?)
</any>
(? 기호는 요소가 any 요소 내에서 0번 또는 1번 발생할 수 있음을 선언합니다)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
maxOccurs | Optional. Specifies the maximum number of times the any element can occur in the parent element. The value can be any number >= 0, or if you want to set no limit on the maximum number, use the value "unbounded". Default value is 1 |
minOccurs | Optional. Specifies the minimum number of times the any element can occur in the parent element. The value can be any number >= 0. Default value is 1 |
namespace | Optional. Specifies the namespaces containing the elements
that can be used. Can be set to one of the following:
|
processContents | Optional. Specifies how the XML processor should handle
validation against the elements specified by this any element. Can be set to
one of the following:
|
any attributes | Optional. Specifies any other attributes with non-schema namespace |
실시예 1
다음 예는 "person"이라는 요소에 대한 선언을 보여줍니다. <any> 요소를 사용하여 작성자는 "person"의 내용을 모든 요소로 확장할 수 있습니다(<lastname> 이후).
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
<xs:any minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
❮ 완전한 XML 스키마 참조