Foreword xxxi Acknowledgments xxxiii How to use this book xxxv Chapter 1 Schemas: An introduction 2 1.1 What is a schema? 3 1.2 The purpose of schemas 5 1.2.1 Data validation 5 1.2.2 A contract with trading partners 5 1.2.
3 System documentation 6 1.2.4 Providing information to processors 6 1.2.5 Augmentation of data 6 1.2.6 Application information 6 1.3 Schema design 7 1.
3.1 Accuracy and precision 7 1.3.2 Clarity 8 1.3.3 Broad applicability 8 1.4 Schema languages 9 1.4.
1 Document Type Definition (DTD) 9 1.4.2 Schema requirements expand 10 1.4.3 W3C XML Schema 11 1.4.4 Other schema languages 12 1.4.
4.1 RELAX NG 12 1.4.4.2 Schematron 13 Chapter 2 A quick tour of XML Schema 16 2.1 An example schema 17 2.2 The components of XML Schema 18 2.2.
1 Declarations vs. definitions 18 2.2.2 Global vs. local components 19 2.3 Elements and attributes 20 2.3.1 The tag/type distinction 20 2.
4 Types 21 2.4.1 Simple vs. complex types 21 2.4.2 Named vs. anonymous types 22 2.4.
3 The type definition hierarchy 22 2.5 Simple types 23 2.5.1 Built-in simple types 23 2.5.2 Restricting simple types 24 2.5.3 List and union types 24 2.
6 Complex types 25 2.6.1 Content types 25 2.6.2 Content models 26 2.6.3 Deriving complex types 27 2.7 Namespaces and XML Schema 28 2.
8 Schema composition 29 2.9 Instances and schemas 30 2.10 Annotations 31 2.11 Advanced features 32 2.11.1 Named groups 32 2.11.2 Identity constraints 32 2.
11.3 Substitution groups 32 2.11.4 Redefinition and overriding 33 2.11.5 Assertions 33 Chapter 3 Namespaces 34 3.1 Namespaces in XML 35 3.1.
1 Namespace names 36 3.1.2 Namespace declarations and prefixes 37 3.1.3 Default namespace declarations 39 3.1.4 Name terminology 40 3.1.
5 Scope of namespace declarations 41 3.1.6 Overriding namespace declarations 42 3.1.7 Undeclaring namespaces 43 3.1.8 Attributes and namespaces 44 3.1.
9 A summary example 46 3.2 The relationship between namespaces and schemas 48 3.3 Using namespaces in schemas 48 3.3.1 Target namespaces 48 3.3.2 The XML Schema Namespace 50 3.3.
3 The XML Schema Instance Namespace 51 3.3.4 The Version Control Namespace 51 3.3.5 Namespace declarations in schema documents 52 3.3.5.1 Map a prefix to the XML Schema Namespace 52 3.
3.5.2 Map a prefix to the target namespace 53 3.3.5.3 Map prefixes to all namespaces 54 Chapter 4 Schema composition 56 4.1 Modularizing schema documents 57 4.2 Defining schema documents 58 4.
3 Combining multiple schema documents 61 4.3.1 include 62 4.3.1.1 The syntax of includes 63 4.3.1.
2 Chameleon includes 65 4.3.2 import 66 4.3.2.1 The syntax of imports 67 4.3.2.
2 Multiple levels of imports 70 4.3.2.3 Multiple imports of the same namespace 72 4.4 Schema assembly considerations 75 4.4.1 Uniqueness of qualified names 75 4.4.
2 Missing components 76 4.4.3 Schema document defaults 77 Chapter 5 Instances and schemas 78 5.1 Using the instance attributes 79 5.2 Schema processing 81 5.2.1 Validation 81 5.2.
2 Augmenting the instance 82 5.3 Relating instances to schemas 83 5.3.1 Using hints in the instance 84 5.3.1.1 The xsi:schemaLocation attribute 84 5.3.
1.2 The xsi:noNamespaceSchemaLocation attribute 86 5.4 The root element 87 Chapter 6 Element declarations 88 6.1 Global and local element declarations 89 6.1.1 Global element declarations 89 6.1.2 Local element declarations 93 6.
1.3 Design hint: Should I use global or local element declarations? 95 6.2 Declaring the types of elements 96 6.3 Qualified vs. unqualified forms 98 6.3.1 Qualified local names 98 6.3.
2 Unqualified local names 98 6.3.3 Using elementFormDefault 99 6.3.4 Using form 100 6.3.5 Default namespaces and unqualified names 101 6.4 Default and fixed values 101 6.
4.1 Default values 102 6.4.2 Fixed values 103 6.5 Nils and nillability 105 6.5.1 Using xsi:nil in an instance 108 6.5.
2 Making elements nillable 109 Chapter 7 Attribute declarations 112 7.1 Attributes vs. elements 113 7.2 Global and local attribute declarations 115 7.2.1 Global attribute declarations 115 7.2.2 Local attribute declarations 117 7.
2.3 Design hint: Should I use global or local attribute declarations? 119 7.3 Declaring the types of attributes 120 7.4 Qualified vs. unqualified forms 122 7.5 Default and fixed values 123 7.5.1 Default values 124 7.
5.2 Fixed values 125 7.6 Inherited attributes 126 Chapter 8 Simple types 128 8.1 Simple type varieties 129 8.1.1 Design hint: How much should I break down my data values? 130 8.2 Simple type definitions 131 8.2.
1 Named simple types 131 8.2.2 Anonymous simple types 132 8.2.3 Design hint: Should I use named or anonymous types? 133 8.3 Simple type restrictions 135 8.3.1 Defining a restriction 136 8.
3.2 Overview of the facets 137 8.3.3 Inheriting and restricting facets 139 8.3.4 Fixed facets 140 8.3.4.
1 Design hint: When should I fix a facet? 141 8.4 Facets 142 8.4.1 Bounds facets 142 8.4.2 Length facets 143 8.4.2.
1 Design hint: What if I want to allow empty values? 143 8.4.2.2 Design hint: What if I want to restrict the length of an integer? 144 8.4.3 totalDigits and fractionDigits 145 8.4.4 Enumeration 145 8.
4.5 Pattern 148 8.4.6 Assertion 150 8.4.7 Explicit Time Zone 150 8.4.8 Whitespace 151 8.
5 Preventing simple type derivation 152 8.6 Implementation-defined types and facets 154 8.6.1 Implementation-defined types 154 8.6.2 Implementation-defined facets 155 Chapter 9 Regular expressions 158 9.1 The structure of a regular expression 159 9.2 Atoms 161 9.
2.1 Normal characters 162 9.2.2 The wildcard escape character 164 9.2.3 Character class escapes 164 9.2.3.
1 Single-character escapes 165 9.2.3.2 Multicharacter escapes 166 9.2.3.3 Category escapes 167 9.2.
3.4 Block escapes 170 9.2.4 Character class expressions 171 9.2.4.1 Listing individual characters 171 9.2.
4.2 Specifying a range 172 9.2.4.3 Combining individual characters and ranges 173 9.2.4.4 Negating a character class expression 173 9.
2.4.5 Subtracting from a character class expression 174 9.2.4.6 Escaping rules for character class expressions 175 9.2.5 Parenthesized regular exp.