혼합 형식 및 단순 내용

SQL Server에서는 혼합 형식을 단순 내용으로 제한할 수 없습니다. 

아래의 XML 스키마 컬렉션에서 myComplexTypeA는 혼합 형식으로 비워둘 수 있습니다. 즉 해당 요소의 minOccurs가 모두 0으로 설정됩니다. myComplexTypeB 선언에서처럼 혼합 형식을 단순 내용으로 제한하려는 시도는 지원되지 않습니다. 따라서 다음과 같은 XML 스키마 컬렉션을 만들 수 없습니다.

CREATE XML SCHEMA COLLECTION SC AS '
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ns" xmlns:ns="http://ns"
xmlns:ns1="http://ns1">

    <complexType name="myComplexTypeA" mixed="true">
        <sequence>
            <element name="a" type="string" minOccurs="0"/>
            <element name="b" type="string" minOccurs="0" maxOccurs="23"/>
        </sequence>
    </complexType>


    <complexType name="myComplexTypeB">
        <simpleContent>
            <restriction base="ns:myComplexTypeA">
                <simpleType>
                    <restriction base="int">
                        <minExclusive value="25"/>
                    </restriction>
                </simpleType>
            </restriction>
        </simpleContent>
    </complexType>
</schema>
'
GO

참고 항목

참조

서버의 XML 스키마 컬렉션에 대한 요구 사항 및 제한 사항