Tipo misto e contenuto semplice
Si applica a:SQL ServerDatabase SQL diAzure Istanza gestita di SQL di Azure
SQL Server non supporta la limitazione di un tipo misto a un contenuto semplice.
Esempio
Nella raccolta di XML Schema seguente, myComplexTypeA
è un tipo complesso che è possibile svuotare. Ovvero, entrambi gli elementi hanno minOccurs
impostato su 0. Il tentativo di limitarlo a un contenuto semplice, come nella myComplexTypeB
dichiarazione, non è supportato. La creazione della raccolta di XML Schema seguente avrà esito negativo:
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
Vedi anche
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Invia e visualizza il feedback per