XSD as a type system
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.