WebReference.com - Chapter 1 of Professional XML Schemas, from Wrox Press Ltd
Professional XML Schemas
Chapter 1: Getting Started with XML Schemas*
The series of excerpts below are from Chapter 1 of the Wrox Press Ltd title
Professional XML Schemas.
This chapter introduces the W3C's XML Schema Recommendation and covers the mechanisms by which XML Schema allows us to define the elements and attributes we want to allow in our XML documents. We will also see how we can constrain element content and attribute values to have a particular datatype.
In particular this chapter will cover:
- The aims behind the W3C XML Schema specification
- How to create a simple XML Schema
- How to declare elements and attributes
- How to use some of the built-in simple datatypes:
- How to validate an XML document against a schema
This chapter will serve simply as a starting point for you. There are lots of other topics that you need to understand in order to take full advantage of XML Schemas, and as we go through the chapters of this book, you will be building up your experience and writing increasingly complex schemas.
To get you familiar with these concepts, the XML documents in this chapter do not use XML Namespaces, and the markup we are creating does not belong to a namespace. If you wish to write documents that make use of namespaces make sure that you read Chapter 6 before writing your schemas.
- Background Information, Getting Started, Simple vs. Complex Types
- Element and Attribute Declarations
- Annotations and Validation
- Example Schema and Summary
# # #
Created: October 18, 2001
Revised: October 30, 2001