Michael Rys

Musings on XML, XQuery and more...

<January 2009>
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567


Navigation

Papers

SQL Server XML Whitepapers

Weblogging Links

MS Bloggers

Recommended Books

Other Blogs

Recommended Links

Presentations (Upcoming)

Presentations (Recent)

Subscriptions

News


Upcoming Presentations


TechEd 2007, Orlando, June 4 to June 8, 2007


Books I co-authored



www.flickr.com
This is a Flickr badge showing public photos from Michael Rys. Make your own badge here.
eXTReMe Tracker

Post Categories

Article Categories



XSD as a type system

Steve Maine has an interesting piece on why he doesn't consider XML Schemas a type system.
Don Box has an very good rebuttal of Steve's position.
 
I think Don Box's article got it right. XQuery/XPath and their data model use XSD as the basis for their type system. Yes, XML documents can be typed based on many different XSDs. But once you decide on one, the generation of the PSVI will provide you with instance type information and the schema import functionality in XQuery also gives information about the static types.
 
Having wild-card sections and "lax" and "skip" validation that will provide untyped and "partially" typed instances is in my opinion one of the contribution of the document/XML/XSD/semistructured data world to future type systems. The ability to move from typed to untyped data and back is one of the big features of most of the XML-based technology and the ability to get both early and late binding of types will enable different uses of the same XML data and types with the data.
 
Database systems that focus on performance will give the users the ability to bind types early, but will also provide dynamic retyping for the late binding use cases, although at the cost of utilizing typing for performance improvements.
 
In Yukon, we achieve the early binding of types by providing an XML type that is either untyped or can be typed by associating it with a collection of XSD schemata. And the late binding is achieved by allowing the CAST from one XML type to another. And we exploit the type information not only to statically type the query but also to use it in physical design and query optimizations (although, I am sure that we just scratch the surface on that aspect).
 
And Don: Yes the XQuery type system is based on named typing and not structural typing.

posted on Tuesday, January 27, 2004 9:08 PM by mrys


# Take Out: The Daily Doggy Bag of Blog Bits for 29 Jan 2004 @ Wednesday, January 28, 2004 7:22 PM

mrys

# Posts on XML Schema @ Wednesday, June 09, 2004 12:04 AM

mrys

# Posts on XML Schema @ Wednesday, June 09, 2004 12:10 AM

mrys




Powered by Dot Net Junkies, by Telligent Systems