다음을 통해 공유


복합 전역 유형 다시 사용

복잡한 전역 형식을 있는 그대로 사용하려면 스키마 트리의 다른 위치에서 원하는 위치에 새 Record 노드를 삽입하는 것으로 시작합니다. 그런 다음 데이터 구조 형식 속성을 복합 전역 형식의 이름으로 설정합니다.

다음 예제에서 BillingAddress 는 새로 삽입된 레코드 노드의 이름이고 GlobalAddrType 은 채택하는 복합 전역 형식의 이름입니다. 스키마 트리 뷰에서 중복 노드 구조는 ShippingAddress 노드 아래의 인접 노드 구조와 동일한 BillingAddress라는 노드 아래에 표시됩니다.

  • 이전에는 BillingAddress라는 새로 삽입된 노드가 있습니다.

    <xs:schema>  
        <xs:element name="Root">  
            <xs:complexType>  
                <xs:sequence>  
                    <xs:element name="ShippingAddress" type="GlobalAddrType" />  
                    <xs:element name="BillingAddress">  
                        <xs:sequence />  
                    </xs:element>  
                </xs:sequence>  
            </xs:complexType>  
        </xs:element>  
        <xs:complexType name="GlobalAddrType">  
        [Address structure defined globally here.]  
        </xs:complexType>  
    </xs:schema>  
    
  • 복합 기본 형식 GlobalAddrType을 그대로 사용한 후

    <xs:schema>  
        <xs:element name="Root">  
            <xs:complexType>  
                <xs:sequence>  
                    <xs:element name="ShippingAddress" type="GlobalAddrType" />  
                    <xs:element name="BillingAddress" type="GlobalAddrType" />  
                </xs:sequence>  
            </xs:complexType>  
        </xs:element>  
        <xs:complexType name="GlobalAddrType">  
        [Address structure defined globally here.]  
        </xs:complexType>  
    </xs:schema>  
    

참고 항목

복합 전역 형식을 사용하는 방법