The XML Schema Complete Reference

The XML Schema Complete Reference

5.0 1
by Cliff Binstock, Mitchell Smith, David Cleary, Diane Kennedy

ISBN-10: 0672323745

ISBN-13: 9780672323744

Pub. Date: 10/04/2002

Publisher: Addison-Wesley

With the successful implementation of XML Schema, developers are learning how to increase productivity, improve software reliability, minimize development time, and decrease time to market. This in-depth reference is an all-in-one resource designed to help developers leverage the power and potential of XML schemas by offering a complete roadmap to their creation,


With the successful implementation of XML Schema, developers are learning how to increase productivity, improve software reliability, minimize development time, and decrease time to market. This in-depth reference is an all-in-one resource designed to help developers leverage the power and potential of XML schemas by offering a complete roadmap to their creation, design, and use. This authoritative reference and tutorial is filled with practical insights and detailed examples. The book begins by providing a conceptual introduction to XML Schema. From there, coverage shifts to the W3C Schema Recommendation and how to apply schemas to specific business goals. The authors provide insight and instruction throughout on integrating XML schemas into existing technologies such as .NET, Java, Visual Basic, Oracle, and more. The book concludes with a complete case study designed to reinforce and illustrate material covered. Whether designing a schema from scratch or integrating schemas into contemporary technologies. The XML Schema Complete Reference is the most complete and definitive sourcebook available for the XML Schema environment.

Product Details

Publication date:
Product dimensions:
7.38(w) x 9.26(h) x 1.76(d)

Table of Contents

Part IXML Schema Overview1
1.1Why XML?4
1.2Why XML Schemas?5
1.3The World Wide Web Consortium (W3C) Recommendations7
1.4Object-oriented Concepts10
1.5Unifying Terminology11
1.6Thematic Examples19
1.7Creating an XML Schema Document24
1.8Typesetting Conventions25
1.9Online Resources25
2XML Processing27
2.2XML Structure Before and After Parsing32
2.3Schema Processing33
3XML Namespaces35
3.1Uniform Resource Names and Uniform Resource Locators36
3.2Namespace Components38
3.3Declaring Namespaces38
3.4Qualified Names and QNames39
3.5Namespace Scoping42
3.6XML Schema and Namespaces42
4XPath and XPointer45
5The Structure of Documents and Schemas57
5.1XML Documents58
5.2The XML Information Set61
5.3Introduction to the PSVI67
5.4Introduction to Schemas69
5.5Schema Documents70
Part IICreating XML Schema Documents73
6Overview of an XML Schema Document75
6.1The Enclosing schema Element78
6.4Annotating Elements82
6.5Constraining Elements84
6.6Constraining Attributes87
6.7Simple Types88
6.8Complex Types91
6.9Model Groups96
6.10Substitution Groups99
6.12Identity Constraint Definitions101
6.14Imports and Includes102
6.15Locating XML Schemas and XML Schema Components103
6.16Schema Element IDs103
7Creating an XML Schema Document105
7.1A Simple XML Schema Document Example106
7.2A schema Element with Every Attribute106
7.3Concepts and Observations107
7.4The schema Element108
7.5The annotation Element116
7.6The appinfo Element119
7.7The documentation Element120
7.8The include Element122
7.9The import Element124
7.10The notation Element128
7.11The redefine Element132
8Element Types137
8.1An Example of a Trivial Element Type138
8.2Concepts and Observations138
8.3The element Element148
8.4The any Element167
9Attribute Types173
9.1An Example of an Attribute Type174
9.2An Example of a Named Attribute-use Group176
9.3An Example of anyAttribute177
9.4Concepts and Observations Regarding Attribute Types180
9.5The attribute Element182
9.6The attributeGroup Element193
9.7The anyAttribute Element196
10Simple Types201
10.1An Example of a Simple Type Derived from the Built-in token Datatype202
10.2An Example of a Pattern-constrained Simple Type203
10.3An Example of a Simple Type Derived from a User-derived Simple Type204
10.4Concepts and Observations204
10.5The simpleType Element208
10.6The restriction Element212
10.7The list Element215
10.8The union Element221
11Complex Types229
11.1An Example of a Complex Type Specifying Empty Content230
11.2An Example of a Complex Type That Adds Attributes to a Simple Type231
11.3An Example of a Complex Type Specifying Nested Element Types234
11.4An Example of a Complex Type Specifying Mixed Content237
11.5Concepts and Observations238
11.6The complexType Element246
11.7The simpleContent Element255
11.8The complexContent Element257
11.9The extension Element259
11.10The restriction Element264
11.11The all Element270
11.12The choice Element273
11.13The sequence Element277
11.14The group Element280
12Built-in Datatypes293
12.1Numeric Datatypes295
12.2Date, Time, and Duration Datatypes304
12.3String Datatypes316
12.4Oddball Datatypes322
13Identity Constraints331
13.1Identity Constraint Example332
13.2Concepts and Observations338
13.3The unique Element343
13.4The key Element346
13.5The keyref Element349
13.6The selector Element353
13.7The field Element354
14Regular Expressions357
14.1Concepts and Observations359
14.2Regular Expression Syntax361
14.3Constraining Simple Content381
Part IIIValidation385
15XML Schema Component Detail387
15.1Schemas: The Basic Idea388
15.2Schema (Schema Schema Component)391
15.3Attribute Types392
15.4Element Types396
15.5Annotation (Annotation Schema Component)411
15.6Notation (Notation Declaration Schema Component)411
16PSVI Detail413
16.1Schema Validation and Schema Processing414
16.2The PSVI416
17Java and the Apache XML Project427
17.1Apache Background428
17.2Java Xerces on Your Computer430
17.3"Hello Apache"435
17.4Critical Xerces Packages442
17.5Xerces Java DOM In-depth447
17.6Java Xerces SAX In-depth459
18MSXML and the Schema Object Model (SOM)471
18.1Introducing MSXML472
18.2Concepts and Observations473
18.3XML Schema Examples474
18.4MSXML Fundamentals474
18.5Schema Object Model (SOM)483
18.7Example: XML Schema Tree493
Part IVResult-oriented Schemas505
19Object-oriented Schemas507
19.1Concepts and Observations508
19.2Object-oriented Concepts509
19.3XML Schemas and Objects510
19.4Mapping XML Schemas to Object-oriented Languages511
19.5Sample Schema: party.xsd521
19.6Design Patterns527
19.7Language Examples529
20Document-oriented Schemas541
20.1Why Use XML for Documents?542
20.2Creating a Schema for a Set of Documents: Document Analysis544
20.3Implementing Document Processing548
21Application-oriented Schemas555
21.1XML Applications556
21.2Role of XML Schemas558
21.3Describing Applications560
21.4Application Structure561
21.5Transporting XML563
21.6Describing Applications569
21.7Example Application572
Part VData-oriented Schemas585
22Data-oriented Schemas: Datatypes587
22.1XML Schema Design Considerations588
22.2General Discussion of Facet Restrictions590
22.3Check Constraints versus Triggers598
23Data-oriented Schemas: Simple Types673
23.1XML Schema Design Considerations674
23.2An Example of a Simple Type Mapping to a Database Schema675
23.3Concepts and Observations678
23.4The list Element678
23.5The union Element690
24Data-oriented Schemas: Complex Types707
24.1XML Schema Design Considerations708
24.2An Example of a Complex Type Mapping to a Database Schema709
24.3An Example of a Complex Type Mapping Supporting Mixed Content to a Database Schema713
24.4Concepts and Observations718
24.5ComplexType Element719
24.6All Element720
24.7Annotation Element722
24.8Any Element722
24.9AnyAttribute Element723
24.10AttributeGroup Element724
24.11Choice Element724
24.12ComplexContent Element727
24.13Group Element727
24.14Sequence Element731
24.15SimpleContent Element738
24.16Restriction Element738
24.17Extension Element745
Part VIA Case Study: The Campus Resource and Scheduling System (CRSS)755
25The Business Case757
25.1Basic CRSS Flow758
25.2CRSS Requirements759
25.3System Users759
25.4Extensible Style Language Transform (XSLT)764
25.5SQL 2000 XML Capabilities767
25.6CRSS Technical Architecture770
26The Architecture773
26.1System Architecture774
26.2Creating HTML Pages by Using XSLT795
26.3Sending Form Data800
27The Server Tier809
27.1Database Design with XML Schemas810
27.2SQL IIS Configuration823
27.3CRSS Application Requirements831
28The Integrated Solution835
28.1CRSS Design Review836
28.2Web Tier Construction838
28.3UI Broker Component Construction842
28.4Security Broker Component Construction846
28.5CRSS Broker Component Construction847
28.6Template Query851
28.7CRSS Review853
Part VIIAppendixes855
Appendix AXML Schema Quick Reference857
Appendix BXML Schema Regular Expression Grammar867
Appendix CThe Thematic Catalog XML Schema877
Appendix DData-oriented Schemas: Oracle8i Datatypes901
D.1General Overview902
D.2Discussion of the Consequences903
Appendix EGlossary923
E.1Objects, Classes, and Instances924
E.3XML Documents927
E.4XML DTDs and Schemas932
E.5Selected Datatypes Used in Schema Documents936
About the Authors939

Customer Reviews

Average Review:

Write a Review

and post it to your social network


Most Helpful Customer Reviews

See all customer reviews >

5 out of 5 based on 0 ratings. 1 reviews.
Guest More than 1 year ago
If you are already using XML, it is probably with DTDs, as this was the first implementation of XML. Both came out of SGML, in which the role of DTDs was defined in the early 1990s. Unfortunately, the drawbacks of DTDs were not fully appreciated until they began to be widely used in XML. A DTD cannot easily constrain an integer variable to a range of values from 5 to 10, say. It has no conception of common primitive types like float or double found in many programming languages. Also, the structure of a DTD is quite unlike that of the XML document it supports. From the point of view of writing parsers, you end up effectively needing two parsing algorithms to read a DTD and an XML document. XML Schemas answer all these issues. Plus namespaces are built into them, to handle collisions in tag names when you use multiple Schemas in a document. With DTDs, namespaces came into being after DTDs were first defined, and had to be bolted on in a most awkward fashion. XML Schema notation for namespaces is much more natural. The problem right now with XML Schema is that it is new. Most XML books use DTDs, in part because when they were written, the Schema specification was not finished by W3C (in May 2001). Some XML books since then do describe Schema. They usually give a good overview and provide examples that work for the XML document examples they describe. So if you have an application that you want to write a Schema for, you can get started. But chances are, you soon run into problems if your application is not a carbon copy of a text's example. You soon need some Schema component or attribute whose usage or even existence was not disclosed in that book. This book addresses that shortfall. It provides at least one example of how to use every attribute of EVERY Schema element. A formidably comprehensive task. Which accounts for the near thousand page size. But this is far more than just some dictionary-style exposition. They describe important closely related issues, like how to use the DOM and Xerces SAX parsers, and the different outlooks these take. Also, from your viewpoint of how to write a Schema for YOUR application, they offer a top-down approach. Schemas can be result-oriented or data-oriented. You get enough details to help decide which case yours fits. This can greatly aid developing a facile "natural" Schema. One where once you have it and an example XML document that uses it, the layout taxonomy seems axiomatic. Which should be your goal. It is not enough to define a Schema that can hold all the information you have. The skill is in making a Schema that does that and has a clear, obvious logic. Because in many cases others, probably not as technically adept as you, get to fill in documents based on it. So the logic should be clear to them. Even if they do not directly write into an XML document, but build it from a GUI, the clearer the Schema, the easier it is for someone to build a GUI to populate a document based on it. The authors also provide a website ( that has the code described in the book, and many more examples. Worth bookmarking. So try this book and its website if you need an authoritative guide to writing Schemas.