Product Details
Definitive XML Schema

Definitive XML Schema
By Priscilla Walmsley

List Price: $52.99
Price: $33.38 & eligible for FREE Super Saver Shipping on orders over $25. Details

Availability: Usually ships in 24 hours
Ships from and sold by Amazon.com

34 new or used available from $24.80

Average customer review:

Product Description

This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version.

The authoritative XML Schema reference and tutorial!

  • Leverage the full power of XML Schema!
  • In-depth coverage of the approved W3C Recommendation
  • Schema design—practical and thorough
  • Transition help for experienced DTD developers
  • Authoritative! By Priscilla Walmsley—a member of the W3C XML Schema Working Group

To leverage the full power of XML, companies need shared vocabularies to base their documents and scripts upon. XML Schema makes it possible to create those shared vocabularies-and Definitive XML Schema is the authoritative guide to the standard! Written by Priscilla Walmsley, a member of the W3C working group that created XML Schema, this book explains the W3C Recommendation with unprecedented insight and clarity—and introduces practical techniques for writing schemas to support any B2B, Web service, or content processing application. Coverage includes:

  • How XML Schema provides a rigorous, complete standard for modeling XML document structure, content, and datatypes
  • Working with schemas: Schema composition, instance validation, documentation, namespaces, and more
  • XML Schema building blocks: elements, attributes, and types
  • Advanced techniques: type derivation, model groups, substitution groups, identity constraints, redefinition, and much more
  • An in-depth primer on effective schema design, including naming, document structure, and extensibility considerations
  • Transition guidance for experienced DTD developers

Definitive XML Schema brings together expert guidance for schema design, superior approaches to schema development, and the most systematic XML Schema reference on the market. Whether you're a developer, architect, or content specialist, it's the only XML Schema resource you need!

"XML Schema is an incredibly powerful-and complex-document schema language, with such new capabilities as strong typing, modularity, inheritance, and identity constraints. This book guides you through the complexity so you can confidently use that power for your own projects."

—Charles F. Goldfarb


Product Details

  • Amazon Sales Rank: #245183 in Books
  • Published on: 2001-12-17
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 560 pages

Editorial Reviews

From the Back Cover

The authoritative XML Schema reference and tutorial!

  • Leverage the full power of XML Schema!
  • In-depth coverage of the approved W3C Recommendation
  • Schema design—practical and thorough
  • Transition help for experienced DTD developers
  • Authoritative! By Priscilla Walmsley—a member of the W3C XML Schema Working Group

To leverage the full power of XML, companies need shared vocabularies to base their documents and scripts upon. XML Schema makes it possible to create those shared vocabularies-and Definitive XML Schema is the authoritative guide to the standard! Written by Priscilla Walmsley, a member of the W3C working group that created XML Schema, this book explains the W3C Recommendation with unprecedented insight and clarity—and introduces practical techniques for writing schemas to support any B2B, Web service, or content processing application. Coverage includes:

  • How XML Schema provides a rigorous, complete standard for modeling XML document structure, content, and datatypes
  • Working with schemas: Schema composition, instance validation, documentation, namespaces, and more
  • XML Schema building blocks: elements, attributes, and types
  • Advanced techniques: type derivation, model groups, substitution groups, identity constraints, redefinition, and much more
  • An in-depth primer on effective schema design, including naming, document structure, and extensibility considerations
  • Transition guidance for experienced DTD developers

Definitive XML Schema brings together expert guidance for schema design, superior approaches to schema development, and the most systematic XML Schema reference on the market. Whether you're a developer, architect, or content specialist, it's the only XML Schema resource you need!

"XML Schema is an incredibly powerful-and complex-document schema language, with such new capabilities as strong typing, modularity, inheritance, and identity constraints. This book guides you through the complexity so you can confidently use that power for your own projects." —Charles F. Goldfarb

About the Author

PRISCILLA WALMSLEY is a software architect at Vitria Technology, specializing in XML architecture and data management. She previously co-founded XMLSolutions Corporation. Walmsley has extensive expertise in electronic commerce, enterprise application integration, and data management, and has served with the W3C XML Schema Working Group since 1999.About the Series Editor

Charles F. Goldfarb is the father of XML technology. He invented SGML,the Standard Generalized Markup Language on which XML and HTML arebased. You can find him on the Web at xmlbooks

Excerpt. © Reprinted by permission. All rights reserved.

Schemas:An introduction

Chapter 1

This chapter provides a brief explanation of schemas and why they are important. It also discusses the basic schema design goals, and describes the various existing schema languages.

1.1 What is an XML schema?

The word schema means a diagram, plan, or framework. In XML, it refers to a document that describes an XML document. Suppose you have the XML instance shown in Example 1-1. It consists of a product element that has two children (number and size) and an attribute (effDate).

Example 1-2 shows a schema that describes the instance. It contains element and attribute declarations that assign data types and element-type names to elements and attributes.

Example 1-1. Product instance

  557  10

Example 1-2. Product schema

                                                    

1.2 The purpose of schemas

1.2.1 Data validation

One of the most common uses for schemas is to verify that an XML document is valid according to a defined set of rules. A schema can be used to validate:

  • The structure of elements and attributes. For example, a product must have a number and a size, and may optionally have an effDate (effective date).
  • The order of elements. For example, number must appear before size.
  • The data values of attributes and elements, based on ranges, enumerations, and pattern matching. For example, size must be an integer between 2 and 18, and effDate must be a valid date.
  • The uniqueness of values in an instance. For example, all product numbers in an instance must be unique.

1.2.2 A contract with trading partners

Often, XML instances are passed between organizations. A schema may act as a contract with your trading partners. It clearly lays out the rules for document structure and what is required. Since an instance can be validated against a schema, the "contract" can be enforced using available tools.

1.2.3 System documentation

Schemas can provide documentation about the data in an XML instance. Anyone who needs to understand the data can refer to the schema for information about names, structures, and data types of the items. To include further documentation, you can add annotations to any schema component.

1.2.4 Augmentation of data

Schema processing can also add to the instance. It inserts default and fixed values for elements and attributes, and normalizes whitespace according to the data type.

1.2.5 Application information

Schemas provide a way for additional information about the data to be supplied to the application when processing a particular type of document. For example, you could include information on how to map the product element instances to a database table, and have the application use this information to automatically update a particular table with the data.

In addition to being available at processing time, this information in schemas can be used to generate code such as:

  • User interfaces for editing the information. For example, if you know that size is between 2 and 18, you can generate an interface that has a slider bar with these values as the limits.
  • Stylesheets to transform the instance data into a reader-friendly representation such as XHTML. For example, if you know that the human-readable name for the content of a number element is "Product Number" you can use this as a column header.
  • Code to insert or extract the data from a database. For example, if you know that the product number maps to the PROD_NUM column on the PRODUCTS table, you can generate an efficient routine to insert it into that column.

Tools have only just begun to take advantage of the possibilities of schemas. In the coming years, we will see schemas used in many creative new ways.

1.3 Schema design

XML Schema is packed with features, and there are often several ways to accurately describe the same thing. The decisions made during schema design can affect its usability, accuracy, and applicability. Therefore, it is important to keep in mind your design objectives when creating a schema. These objectives may vary depending on how you are using XML, but some are common to all use cases.

1.3.1 Accuracy and precision

Obviously, a schema should accurately describe an XML instance and allow it to be validated. Schemas should also be precise in describing data. Precision can result in more complete validation as well as better documentation. Precision can be achieved by defining restrictive data types that truly represent valid values.

1.3.2 Clarity

Schemas should be very clear, allowing a reader to instantly understand the structure and characteristics of the instance being described. Clarity can be achieved by:

  • appropriate choice of names,
  • consistency in naming,
  • consistency in structure,
  • good documentation,
  • avoiding unnecessary complexity.

1.3.3 Broad applicability

There is a temptation to create schemas that are useful only for a specific application purpose. In some cases, this may be appropriate. However, it is better to create a schema that has broader applicability. For example, a business unit that handles only domestic accounts may not use a country element declaration as part of an address. They should consider adding it in as an optional element for the purposes of consis-tency and future usability.

There are two components to a schema's broad applicability: reusability and extensibility. Reusable schema components are modular and well documented, encouraging schema authors to reuse them in other schemas. Extensible components are flexible and open, allowing other schema authors to build on them for future uses. Since reusability and extensibility are important, all of Chapter 21, "Extensibility and reuse," is devoted to them.

1.4 Schema languages

1.4.1 Document Type Definitions (DTDs)

Document Type Definitions (DTDs) are a commonly used method of describing XML documents. They allow you to define the basic structure of an XML instance, including:

  • the structure and order of child elements in an element type,
  • the attributes of an element type,
  • basic data typing for attributes,
  • default and fixed values for attributes,
  • notations to represent other data formats.

Example 1-3 shows a DTD that is roughly equivalent to our schema in Example 1-2.

Example 1-3. Product DTD

DTDs have many advantages. They are relatively simple, have a compact syntax, and are widely understood by XML implementers. When designed well, they can be extremely modular, flexible, and extensible.

However, DTDs also have some shortcomings. They have their own non-XML syntax, do not support namespaces easily, and provide very limited data typing, for attributes only.

1.4.2 Enter schemas

As XML became increasingly popular for data applications such as e-commerce and enterprise application integration (EAI), a more robust schema language was needed. Specifically, XML developers wanted:

  • The ability to constrain data based on common data types such as integer and date.
  • The ability to define their own data types in order to further constrain data.
  • Support for namespaces.
  • The ability to specify multiple declarations for the same element-type name in different contexts.
  • Object oriented features such as type derivation. The ability to express types as extensions or restrictions of other types allows them to be processed similarly and substituted for each other.
  • A schema language that uses XML syntax. This is advantageous because it is extensible, can represent more advanced models and can be processed by many available tools.
  • The ability to add structured documentation and application information that is passed to the application during processing.

DTDs are not likely to disappear now that schemas have arrived on the scene. They are supported in many tools, are widely understood, and are currently in use in many applications. In addition, they continue to be useful as a lightweight alternative to schemas.

1.4.3 W3C XML Schema

Four schema languages were developed before work began on XML Schema: XDR (XML Data Reduced), DCD, SOX, and DDML. These four languages were considered together as a starting point for XML Schema, and many of their originators were involved in the creation of XML Schema.

The World Wide Web Consortium (W3C) began work on XML Schema in 1998. The first version, upon which this book is based, became an official Recommendation on May 2, 2001. The formal Recommendation is in three parts:

  • XML Schema Part 0: Primer is a non-normative introduction to XML Schema that provides a lot of examples and explanations. It can be found at http://www.w3.org/TR/xmlschema-0/
  • XML Schema Part 1: Structures describes most of the components of XML Schema. It can be found at http://www.w3.org/TR/xmlschema-1/
  • XML Schema Part 2: Datatypes covers simple data types. It explains the...


Customer Reviews

Many insights, not mere facts.5
There are quite a few books about XML Schema in the market. There are quite a few freebie tutorials on the web too. These may serve your purpose well enough if you are merely trying to acquire an overview of the subject. But if you are like me, learning XML schema on the job and having trouble finding specific answers as you design a new schema or worse extend an exisiting schema, this book is certainly for you.

Namespaces are a fairly complex topic and they are handled very well in this textbook. Much of my confusion about how to mix and match the SimpleContent, SimpleType, ComplexContent and ComplexType tags vanished after I read the relevant chapters. The last chapter on reuse and extension is a gem and shows that Walmsley is not one of the rapidly proliferating clan of writers whose chapters are mere rephrasings of the manuals. She brings impressive credentials from the W3C and it shows in each page.

I was in the middle of extending a schema when I ran out and bought this book. I ran into some truly murky waters with deterministic and non deterministic schemas when my Microsoft XML parser threw up its hands and refused to validate my XML against my XSD because it was non deterministic. I could find few satisfactory solutions elsewhere. This book gave me all the answers I needed.

If you are a serious schema developer, buy this book, its well worth the money.

Clarity!5
I read this book from cover to cover this weekend. That fact alone tells you something about its contents! If you are the sort of person who finds the W3C's XML Schema specification completely transparent and easy to read then Priscilla Walmsley's book is useless fluff. If, however, like virtually everyone on the planet, you find the XML Schema specification indecipherable, do yourself a favour: either forget totally about the abomination that is XML Schema OR read Priscilla's book and discover that XML Schema is finite, is do-able and has certain simplifying characteristics (such as the fact that all named components must be global) that make it tolerable.

The process of reading this book is effortless. Every sentence is crafted to be illuminating without the merest hint of padding. This book is really a comprehensive reference manual that reads like a coherent novel while at the same time lacking pretentious verbiage.

As 2002 dawned, I resolved not to buy any more books...I have far too many and all the specifications are available free online anyway. Having struggled for days with a few online articles and the three XML Schema specification documents, I decided that I really did need the help of a book...but thought it unlikely that I would find one that was little more than a rehash of the specs. In a sense, Priscilla's book is a rehash of the specs. in as much as it doesn't present anything more than can be found in the specs. The presentation is what counts here though: clear examples for EVERY aspect of the syntax; well-organized content that at every point assumes no more knowledge that has been presented earlier.

Thanks Priscilla for changing my perception of XML Schema and for providing a book that was easy to read and that is now my number one reference for XML Schema :-)

Excellent resource! A must-have guide to XML Schema5
As a professional application developer I don't have the luxury of time to read through massive "door-stops" to get up and running with a new topic. I'm sure many other programmers out there share the same constraint. I normally will not give a computer reference book, or any book for that matter, a chance if it isn't clear, concise and well organized. In short, if it cannot explain a concept clearly in the first few pages or if I find myself reading a chapter over and over again, it isn't worth the little time I do have.

After reading the positive reviews on Amazon I decided to take a chance and purchase it. Even after I received the book I approached it with the same air of skepticism as any other book I pick up and I must say that I was "hooked" the moment I started to read it. I found Priscilla's writing style to be effortless and fluid, clearly explaining the topic with plenty of examples to illustrate each concept. The topics are presented in logical order, but the book is approachable from any starting point within it. A fantastic read and an invaluable reference for anyone seriously involved with XML Schema. I place this book within quick reach in my library.

When learning to apply a new technology such as XML Schema, XSLT, XPath, etc, I will sometimes approach it with a misconception of overcomplication, thinking that the topic will be so difficult to understand that it will take months to grasp. Picking the right book can make all the difference. Some books only aim to exhaustively detail the mechanics and spew theories without any consideration for the practical application of the technology. And that type of book may be for some, but when you're under the constraint of time, there is little use for theory for the rest of us who need to have a product done by yesterday! This book is immediately practical and approachable from page 1! XML Schema is very easy to understand when it is explained by a professional who can effectively communicate. If you want this in a book, then Priscilla Walmsley is the person that delivers. If you are looking for the best guide to XML Schema on the planet, your journey has come to and end; look no further.

"Definitive XML Schema" is excellent and I highly recommend it for anyone wanting to learn more about this technology!!