WebReference.com - Part 4 of Chapter 1: Professional XML Schemas, from Wrox Press Ltd (4/4)
Professional XML Schemas
In this chapter we have looked at the basics of the W3C XML Schema syntax, and how we can declare which elements and attributes are allowed to appear in our XML documents. We have seen that in order to declare an element or an attribute, we must associate its name with a type, and how XML Schema introduces two categories of types:
Simple types: which restrict text-only element content and attribute values
Complex types: which are required to indicate when an element contains child elements and carries attributes
We have briefly touched on some of the other features that make XML Schema such a powerful language:
The built-in types such as string, date and integer, which will make integration of XML with applications and data sources a lot easier
The annotation mechanism for commenting and passing information to processing applications
We also alluded to some of the more complicated features we will be seeing in coming chapters, such as the use of namespaces, named complex types and different compositors.
Having addressed the basics of the element and attribute declarations and the differences between simple and complex types in XML Schema, you can go on to look at the built-in types in more depth in the next chapter. In Chapter 3, we'll move on to see how we can build more complicated structures.
Created: October 30, 2001
Revised: October 30, 2001