Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.72 KB

File metadata and controls

33 lines (24 loc) · 1.72 KB
title The <xsd:redefine> Element
description Learn about support for the W3C XSD redefine element and how to update an XML schema or its components.
author MikeRayMSFT
ms.author mikeray
ms.reviewer randolphwest
ms.date 05/05/2022
ms.service sql
ms.subservice xml
ms.topic concept-article
ms.custom
ignite-2025
helpviewer_keywords
xsd:redefine element

The <xsd:redefine> element

[!INCLUDE SQL Server Azure SQL Database FabricSQLDB]

The W3C XSD redefine element provides support for redefining schema components. However, support for this directive is potentially costly to performance and also requires that [!INCLUDEssNoVersion] revalidate all instances of the xml data type associated with the redefined schema. Therefore, [!INCLUDEssNoVersion] doesn't support this element. XML schemas that include the <xsd:redefine> element are rejected by the server.

To update a schema or its components, you can do the following instead:

  1. Create a new XML Schema collection with the modified schema components.

  2. Retype all xml data types (XML DT) that use the XML Schema collection to be redefined to use the new XML Schema collection instead. To do this, use the ALTER COLUMN option of the ALTER TABLE command for retyping columns, or change the XML Schema collection constraints on variables or parameters.

  3. Drop the old version of the XML Schema collection.

See also