Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Schema Collections   (RSS)

Silent XQuery failures

A newsgroup post I read earlier today reminded me that there are cases where failure to get the expected result when using XQuery can sometimes be difficult to diagnose. Here’s what the poster was doing declare @xml xml set @xml = '<root><test></test></root>'

Mixed content (part 3)

It’s been a few weeks since my last post about mixed content so let’s pick up right where we left off. This time we will look at DML operations on mixed content. We’ll keep using the XML schema as well as the table I created in the first post of this
Posted by denisruc | 1 Comments
Filed under: , ,

Complementing XSD with CHECK constraints

I was recently asked to look at a customer’s question. This person wanted to write a schema that would validate instances like the following one. <TopElement> <a> <element1 att1="data1" att2="data2"/> <an_element att1="data 1" att2="data
Posted by denisruc | 3 Comments
Filed under: ,

Explaining the reasons behind some of XML datatype's limitations

If you use XML in SQL Server 2005, and especially if you use it in association with schemas, I suggest you read Brandon's recent blog post about the limitations that were placed on the XML datatype. Brandon is one of our developers and he's got first-hand

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
Posted by denisruc | 0 Comments
Filed under: ,

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
Posted by denisruc | 1 Comments
Filed under: ,

Download SP1 today!

Yesterday we released our first Service Pack for SQL Server 2005 . You might remember a while back I had written a small post about being hard at work on SP1. Back then I avoided giving any details for fear of running afoul of corporate policy but since

Importing an existing XML schema into SQL Server 2005

In my last post I addressed the issue of non deterministic content models, which can be valid with respect to the W3C’s standards, but which are always rejected by SQL Server 2005. There are a few other XSD features that SQL Server 2005 doesn’t support.
Posted by denisruc | 13 Comments
Filed under: ,

Fixing non deterministic schemas

If you’ve been importing XML schemas into SQL Server 2005 you might have encountered this error message XML Validation: XML instances of the content model of type or model group '…' can be validated in multiple ways and are not supported. The reason for
Posted by denisruc | 1 Comments
Filed under: ,

How to preserve whitespaces

For once I'm going to venture outside of the realm of typed XML and address an issue that might be of concern to users of untyped XML as well. We've been asked a few times if we had a solution to preserve non-significant whitespaces in an XML instance.
Posted by denisruc | 1 Comments
Filed under: ,

Validating without typing

You might encounter a situation where you want to validate incoming XML instances against the contents of an xml schema collection, but you still want to store your XML data as untyped. We're going to look at a very simple way to do this. All you have
Posted by denisruc | 0 Comments
Filed under:

Document and content

Document and content are two options you can use in SQL Server 2005 when typing an XML column or variable with an XML schema collection. To put it simply document means only XML documents should be accepted (exactly one top level element) while content

Using the XPath provided in XML validation error messages

Yesterday’s post regarding the addition of a location in validation error messages brought back a conversation I’d had with our Program Manager regarding the use of that XPath to automatically retrieve invalid XML fragments when validation fails I’ve
Posted by denisruc | 0 Comments
Filed under: ,

Substitution groups and their effects on type derivation

If you’ve been playing with Xml schema collections in SQL Server 2005, you might have noticed that it is forbidden to expand substitution groups membership in ALTER XML SCHEMA COLLECTION statements. What this mean practically is that already-persisted
Posted by denisruc | 4 Comments
Filed under: ,

Welcome

Welcome to my newly created blog. My name is Denis Ruckebusch. I've been part of the test organization at Microsoft for the past 6 years. I spent the last 4 working on the new XML datatype feature in SQL Server 2005. My main area of focus is typed XML.
 
Page view tracker