Definitive XML Schema
Priscilla Walmsley (pwalmsley@datypic.com)
ISBN: 0130655678
1st edition, , Prentice Hall PTR.
Table of contents
- Chapter 1: Schemas: An introduction
- 1.1 What is an XML schema?
- 1.2 The purpose of schemas
- 1.2.1 Data validation
- 1.2.2 A contract with trading partners
- 1.2.3 System documentation
- 1.2.4 Augmentation of data
- 1.2.5 Application information
- 1.3 Schema design
- 1.3.1 Accuracy and precision
- 1.3.2 Clarity
- 1.3.3 Broad applicability
- 1.4 Schema languages
- 1.4.1 Document Type Definitions (DTDs)
- 1.4.2 Enter schemas
- 1.4.3 W3C XML Schema
- 1.4.4 Notes on terminology
- 1.4.4.1 Schema
- 1.4.4.2 Type
- 1.4.5 Additional schema languages
- 1.4.5.1 RELAX NG
- 1.4.5.2 Schematron
- Chapter 2: A quick tour of XML Schema
- 2.1 An example schema
- 2.2 The components of XML Schema
- 2.2.1 Declarations vs. definitions
- 2.2.2 Global vs. local components
- 2.3 Elements and attributes
- 2.3.1 The tag/type distinction
- 2.4 Data types
- 2.4.1 Simple vs. complex types
- 2.4.2 Named vs. anonymous types
- 2.4.3 The type definition hierarchy
- 2.5 Simple types
- 2.5.1 Built-in simple types
- 2.5.2 Restricting simple types
- 2.5.3 List and union types
- 2.6 Complex types
- 2.6.1 Content types
- 2.6.2 Content models
- 2.6.3 Deriving complex types
- 2.7 Namespaces and XML Schema
- 2.8 Schema composition
- 2.9 Instances and schemas
- 2.10 Annotations
- 2.11 Advanced features
- 2.11.1 Reusable groups
- 2.11.2 Identity constraints
- 2.11.3 Substitution groups
- 2.11.4 Redefinition
- Chapter 3: Namespaces
- 3.1 Namespaces in XML
- 3.1.1 Namespace names are URIs
- 3.1.2 Namespace declarations and prefixes
- 3.1.3 Default namespace declarations
- 3.1.4 Name terminology
- 3.1.5 Scope of namespace declarations
- 3.1.6 Overriding namespace declarations
- 3.1.7 Attributes and namespaces
- 3.1.8 A summary example
- 3.2 The relationship between namespaces and schemas
- 3.3 Using namespaces in XSDL
- 3.3.1 Target namespaces
- 3.3.2 The XML Schema Namespace
- 3.3.3 The XML Schema Instance Namespace
- 3.3.4 Namespace declarations in schema documents
- 3.3.4.1 Map a prefix to the XML Schema Namespace
- 3.3.4.2 Map a prefix to the target namespace
- 3.3.4.3 Map a prefix to all namespaces
- 3.1 Namespaces in XML
- Chapter 4: Schema composition
- 4.1 Modularizing schema documents
- 4.2 Defining schema documents
- 4.2.1 Defining a schema document in XSDL
- 4.3 Schema assembly
- 4.3.1 Assembling schemas from multiple documents
- 4.3.2 Uniqueness of qualified names
- 4.3.3 Missing components
- 4.3.4 Schema document defaults
- 4.4
include
,redefine
, andimport
- 4.4.1
include
- 4.4.2
redefine
- 4.4.3
import
- 4.4.1
- Chapter 5: Instances and schemas
- 5.1 Using the instance attributes
- 5.2 Schema processing
- 5.2.1 Validation
- 5.2.2 Augmenting the instance
- 5.3 Relating instances to schemas
- 5.4 Using XSDL hints in the instance
- 5.4.1 The
xsi:schemaLocation
attribute - 5.4.2 The
xsi:noNamespaceSchemaLocation
attribute
- 5.4.1 The
- 5.5 Dereferencing namespaces
- 5.6 The root element
- 5.7 Using DTDs and schemas together
- 5.8 Using specific schema processors
- 5.8.1 XSV
- 5.8.2 Xerces
- 5.8.3 Oracle XDK
- 5.8.4 Microsoft MSXML
- Chapter 6: Schema documentation and extension
- 6.1 The mechanics
- 6.1.1 Annotations
- 6.1.2 User documentation
- 6.1.3 Application information
- 6.1.4 Validating annotations
- 6.1.5 Non-native attributes
- 6.1.6 Design hint: Should I use annotations or non-native attributes?
- 6.2 User documentation
- 6.2.1 Types of user documentation
- 6.2.2 Data element definitions
- 6.2.3 Code documentation
- 6.2.4 Section comments
- 6.3 Application information
- 6.3.1 Types of application information
- 6.3.2 Schematron for co-occurrence constraints
- 6.3.3 Schema adjunct framework for RDBMS mappings
- 6.4 Notations
- 6.4.1 Declaring a notation
- 6.4.2 Declaring a notation attribute
- 6.4.3 Notations and unparsed entities
- 6.1 The mechanics
- Chapter 7: Element declarations
- 7.1 Global and local element declarations
- 7.1.1 Global element declarations
- 7.1.2 Local element declarations
- 7.1.3 Design hint: Should I use global or local element declarations?
- 7.2 Declaring the data types of elements
- 7.3 Default and fixed values
- 7.3.1 Default values
- 7.3.2 Fixed values
- 7.4 Nils and nillability
- 7.4.1 Using
xsi:nil
in an instance - 7.4.2 Making elements nillable
- 7.4.1 Using
- 7.5 Qualified vs. unqualified forms
- 7.1 Global and local element declarations
- Chapter 8: Attribute declarations
- 8.1 Global and local attribute declarations
- 8.1.1 Design hint: Should I use attributes or elements?
- 8.1.2 Global attribute declarations
- 8.1.3 Local attribute declarations
- 8.1.4 Design hint: Should I declare attributes globally or locally?
- 8.2 Assigning types to attributes
- 8.3 Default and fixed values
- 8.3.1 Default values
- 8.3.2 Fixed values
- 8.4 Qualified vs. unqualified forms
- 8.1 Global and local attribute declarations
- Chapter 9: Simple types
- 9.1 Simple type varieties
- 9.1.1 Design hint: How much should I break down my data values?
- 9.2 Simple type definitions
- 9.2.1 Named simple types
- 9.2.2 Anonymous simple types
- 9.2.3 Design hint: Should I use named or anonymous types?
- 9.3 Simple type restrictions
- 9.3.1 Defining a restriction
- 9.3.2 Overview of the facets
- 9.3.3 Inheriting and restricting facets
- 9.3.4 Fixed facets
- 9.3.4.1 Design hint: When should I fix a facet?
- 9.4 Facets
- 9.4.1 Bounds facets
- 9.4.2 Length facets
- 9.4.2.1 Design hint: What if I want to allow empty values?
- 9.4.2.2 Design hint: What if I want to restrict the length of an integer?
- 9.4.3
totalDigits
andfractionDigits
- 9.4.4 Enumeration
- 9.4.5 Pattern
- 9.4.6 Whitespace
- 9.5 Preventing simple type derivation
- 9.1 Simple type varieties
- Chapter 10: Regular expressions
- 10.1 The structure of a regular expression
- 10.2 Atoms
- 10.2.1 Normal characters
- 10.2.2 Character class escapes
- 10.2.2.1 Single-character escapes
- 10.2.2.2 Multi-character escapes
- 10.2.2.3 Category escapes
- 10.2.2.4 Block escapes
- 10.2.3 Character class expressions
- 10.2.3.1 Specifying a list of characters
- 10.2.3.2 Specifying a range
- 10.2.3.3 Combining characters and ranges
- 10.2.3.4 Negating a character class expression
- 10.2.3.5 Subtracting from a character class expression
- 10.2.4 Parenthesized regular expressions
- 10.3 Quantifiers
- Chapter 11: Union and list types
- 11.1 Varieties and derivation types
- 11.2 Union types
- 11.2.1 Defining union types
- 11.2.2 Restricting union types
- 11.2.3 Unions of unions
- 11.2.4 Specifying the member type in the instance
- 11.3 List types
- 11.3.1 Defining list types
- 11.3.2 Design hint: When should I use lists?
- 11.3.3 Restricting list types
- 11.3.3.1 Length facets
- 11.3.3.2 Enumeration facet
- 11.3.3.3 Pattern facet
- 11.3.4 Lists and strings
- 11.3.5 Lists of unions
- 11.3.6 Lists of lists
- 11.3.7 Restricting the item type
- Chapter 12: Built-in simple types
- 12.1 Built-in types
- 12.2 String-based types
- 12.2.1 string, normalizedString, and token
- 12.2.1.1 Design hint: Should I use string, normalizedString, or token?
- 12.2.2
Name
- 12.2.3
NCName
- 12.2.4
language
- 12.2.1 string, normalizedString, and token
- 12.3 Numeric types
- 12.3.1
float
anddouble
- 12.3.2
decimal
- 12.3.3 Integer types
- 12.3.3.1 Design hint: Is it an integer or a string?
- 12.3.1
- 12.4 Date and time types
- 12.4.1
date
- 12.4.2
time
- 12.4.3
dateTime
- 12.4.4
gYear
- 12.4.5
gYearMonth
- 12.4.6
gMonth
- 12.4.7
gMonthDay
- 12.4.8
gDay
- 12.4.9
duration
- 12.4.10 Representing time zones
- 12.4.11 Facets
- 12.4.12 Date and time ordering
- 12.4.1
- 12.5 Legacy types
- 12.5.1
ID
- 12.5.2
IDREF
- 12.5.3
IDREFS
- 12.5.4
ENTITY
- 12.5.5
ENTITIES
- 12.5.6
NMTOKEN
- 12.5.7
NMTOKENS
- 12.5.8
NOTATION
- 12.5.1
- 12.6 Other types
- 12.6.1
QName
- 12.6.2
boolean
- 12.6.3
hexBinary
andbase64Binary
- 12.6.4
anyURI
- 12.6.1
- 12.7 Type equality
- Chapter 13: Complex types
- 13.1 What are complex types?
- 13.2 Defining complex types
- 13.2.1 Named complex types
- 13.2.2 Anonymous complex types
- 13.2.3 Complex type alternatives
- 13.3 Content types
- 13.3.1 Simple content
- 13.3.2 Element-only content
- 13.3.3 Mixed content
- 13.3.4 Empty content
- 13.4 Using element types
- 13.4.1 Local element declarations
- 13.4.2 Element references
- 13.4.3 Element wildcards
- 13.4.4 Duplication of element-type names
- 13.5 Using model groups
- 13.5.1
sequence
groups- 13.5.1.1 Design hint: Should I care about the order of elements?
- 13.5.2
choice
groups - 13.5.3 Nesting of sequence and choice groups
- 13.5.4
all
groups - 13.5.5 Named model group references
- 13.5.6 Deterministic content models
- 13.5.1
- 13.6 Using attributes
- 13.6.1 Local attribute declarations
- 13.6.2 Attribute references
- 13.6.3 Attribute wildcards
- 13.6.4 Attribute group references
- Chapter 14: Deriving complex types
- 14.1 Why derive types?
- 14.2 Restriction and extension
- 14.3 Simple content and complex content
- 14.3.1
simpleContent
elements - 14.3.2
complexContent
elements
- 14.3.1
- 14.4 Complex type extensions
- 14.4.1 Simple content extensions
- 14.4.2 Complex content extensions
- 14.4.2.1 Extending choice groups
- 14.4.3 Mixed content extensions
- 14.4.4 Empty content extensions
- 14.4.5 Attribute extensions
- 14.4.6 Attribute wildcard extensions
- 14.5 Complex type restrictions
- 14.5.1 Simple content restrictions
- 14.5.2 Complex content restrictions
- 14.5.2.1 Eliminating meaningless groups
- 14.5.2.2 Restricting element declarations
- 14.5.2.3 Restricting wildcards
- 14.5.2.4 Restricting groups
- 14.5.3 Mixed content restrictions
- 14.5.4 Empty content restrictions
- 14.5.5 Attribute restrictions
- 14.5.6 Attribute wildcard restrictions
- 14.6 Type substitution
- 14.7 Controlling type derivation and substitution
- 14.7.1
final
: Preventing complex type derivation - 14.7.2
block
: Blocking substitution of derived types - 14.7.3 Blocking type substitution in element declarations
- 14.7.4
abstract
: Forcing derivation
- 14.7.1
- Chapter 15: Reusable groups
- 15.1 Why reusable groups?
- 15.2 Named model groups
- 15.2.1 Defining named model groups
- 15.2.2 Referencing named model groups
- 15.2.2.1 Group references
- 15.2.2.2 Referencing a named model group in a complex type
- 15.2.2.3 Using
all
in named model groups - 15.2.2.4 Named model groups referencing named model groups
- 15.3 Attribute groups
- 15.3.1 Defining attribute groups
- 15.3.2 Referencing attribute groups
- 15.3.2.1 Attribute group references
- 15.3.2.2 Referencing attribute groups in complex types
- 15.3.2.3 Duplicate attribute names
- 15.3.2.4 Duplicate attribute wildcard handling
- 15.3.2.5 Attribute groups referencing attribute groups
- 15.4 Reusable groups vs. complex type derivations
- Chapter 16: Substitution groups
- 16.1 Why substitution groups?
- 16.2 The substitution group hierarchy
- 16.3 Declaring a substitution group
- 16.4 Type constraints for substitution groups
- 16.5 Alternatives to substitution groups
- 16.5.1 Reusable choice groups
- 16.5.2 Substituting a derived type in the instance
- 16.6 Controlling substitution groups
- 16.6.1 final: Preventing substitution group declarations
- 16.6.2 block: Blocking substitution in instances
- 16.6.3 abstract: Forcing substitution
- Chapter 17: Identity constraints
- 17.1 Identity constraint categories
- 17.2 Design hint: Should I use
ID
/IDREF
orkey
/keyref
? - 17.3 Structure of an identity constraint
- 17.4 Uniqueness constraints
- 17.5 Key constraints
- 17.6 Key references
- 17.6.1 Key references and type equality
- 17.7 Selectors and fields
- 17.7.1 Selectors
- 17.7.2 Fields
- 17.8 The XML Schema XPath subset
- 17.9 Identity constraints and namespaces
- Chapter 18: Redefining schema components
- 18.1 Redefinition basics
- 18.1.1 Include plus redefine
- 18.1.2 Redefine and namespaces
- 18.1.3 Pervasive impact
- 18.2 The mechanics of redefinition
- 18.3 Redefining simple types
- 18.4 Redefining complex types
- 18.5 Redefining named model groups
- 18.5.1 Defining a subset
- 18.5.2 Defining a superset
- 18.6 Redefining attribute groups
- 18.6.1 Defining a subset
- 18.6.2 Defining a superset
- 18.1 Redefinition basics
- Chapter 19: Topics for DTD users
- 19.1 Element declarations
- 19.1.1 Simple types
- 19.1.2 Complex types with simple content
- 19.1.3 Complex types with complex content
- 19.1.4 Mixed content
- 19.1.5 Empty content
- 19.1.6 Any content
- 19.2 Attribute declarations
- 19.2.1 Attribute types
- 19.2.2 Enumerated attribute types
- 19.2.3 Notation attributes
- 19.2.4 Default values
- 19.3 Notations
- 19.4 Parameter entities for reuse
- 19.4.1 Reusing content models
- 19.4.2 Reusing attributes
- 19.5 Parameter entities for extensibility
- 19.5.1 Extensions for sequence groups
- 19.5.2 Extensions for choice groups
- 19.5.3 Attribute extensions
- 19.5.4 Attribute group extensions
- 19.6 External parameter entities
- 19.7 General entities
- 19.7.1 Character and other parsed entities
- 19.7.2 Unparsed entities
- 19.8 Comments
- 19.9 Using DTDs and schemas together
- 19.1 Element declarations
- Chapter 20: Naming considerations
- 20.1 Naming guidelines
- 20.1.1 Rules for valid XML names
- 20.1.2 Separators
- 20.1.3 Name length
- 20.1.4 Standard terms and abbreviations
- 20.1.5 Use of subject terms
- 20.2 Qualified vs. unqualified names
- 20.2.1 Qualified local names
- 20.2.2 Unqualified local names
- 20.2.3 Using
elementFormDefault
- 20.2.4 Form and global element declarations
- 20.2.5 Default namespaces and unqualified names
- 20.2.6 Design hint: Should I use qualified or unqualified local names?
- 20.2.7 Qualified vs. unqualified attribute names
- 20.3 Structuring namespaces
- 20.3.1 Same namespace
- 20.3.2 Different namespaces
- 20.3.3 Chameleon namespaces
- 20.4 Multiple languages
- 20.1 Naming guidelines
- Chapter 21: Extensibility and reuse
- 21.1 Reuse
- 21.2 Extending schemas
- 21.2.1 Wildcards
- 21.2.2 Type derivation
- 21.2.3 Substitution groups
- 21.2.4 Type redefinition
- 21.2.5 Named model group redefinition
- 21.3 Versioning of schemas
- 21.3.1 Schema compatibility
- 21.3.2 Application compatibility
- 21.3.3 Conversion capability
- 21.3.4 Using version numbers
- 21.4 Designing applications to support change
- Appendix A: Table of XSDL keywords
- A.1 XSDL element types
- A.2 XSDL attributes
- Appendix B: Built-in simple types
- B.1 Built-in simple types
- Index