-- XPathFunctions_ID-IDREF_BookPublisher_XmlSchemaCollection_Script if (exists ( select * from sys.xml_schema_collections where (xml_schema_collections.[schema_id] = schema_id('dbo')) and (xml_schema_collections.name = 'BookPublisher') )) begin drop xml schema collection dbo.BookPublisher end go create xml schema collection dbo.BookPublisher as N' ' go