Defining Nil Null Values
This feature was introduced into W3C XML Schema to map the notion of null values, which is one of the core requirements of the relational model as defined by Codd. The W3C makes a subtle distinction between an empty element and an element that is null or nil, to use the name chosen for the xsi attribute that conveys the information . The two notions are considered different, but related an empty element is not always null, but a null element must be empty . The fact that an element can be nil...
Redefinition of Element and Attribute Groups
The redefinition of complex and simple types seems quite natural and should not be much of a surprise, since it builds on things we've discussed in detail in previous chapters. The new part of xs redefine is that element and attribute groups which cannot be derived can also be redefined. Redefinition of element and attribute groups is done without any special schema element a group redefinition that contains a reference to itself is considered an extension otherwise, it's considered a...
Defining Complex Types
Although the mechanism to forcibly identify a complex type in an instance document is similar to the one we saw for simple types, the motivations for using it can be completely different. If it is still possible to use this feature in case of a polymorphic accessor, to use the terminology taken by the W3C Protocols WG, this is probably a relatively marginal use case for complex types that do not have extension by union. The equivalent to the simple type derivation by union for complex types...
Global Components
A simple example is often better than a long explanation, so to illustrate the differences between the different schema styles, we will take some examples out of our library and study complex and simple type elements and attributes. Let's consider the definition of the book element in the context of our library. We have four different basic ways of defining this element, and they all will validate the same set of instance elements but not the same set of instance documents, since exposing an...
Restrictions Kxm
Some combinations of specifications of namespaces used to define multi-namespace open vocabularies are missing. These include the cases of any namespace known in the current validation context and its complementary any namespace not defined in the current validation context. The behavior of the special value other on unqualified attributes in schemas with target namespaces is contradictory in the W3C XML Schema Recommentation and should be clarified in a future addendum. The most likely...