Restricting the contents of a typed XML column using triggers

A typed XML column/variable is constrained by a schema collection. That means only instances that can be validated against the schemas in the collection will be accepted. You can tighten the rules a little bit with the use of the DOCUMENT facet, which adds the extra requirement that only well formed XML documents be accepted…


Importing the Microsoft Office 2003 schemas into the database

As promised earlier I’m going to give you an example using a real-world schema. I’ve chosen to work with the Office 2003 schemas but I’m going to limit myself to Word and Excel. First, you need to install the schemas from here. In the T-SQL samples below I’ll always assume that the installation was performed at the…