"XML Schema 1.1 has gone from strong data typing to positively stalwart-so powerful it can enforce database level constraints and business rules, so your data transfer code won't have to. This book covers the 1.1 changes-and more-in its 500 revisions to Priscilla Walmsley's 10-year best-selling classic. It's the guide you need to navigate XML Schema's complexity-and master its power!"

-Charles F. Goldfarb

For Ten Years the World's Favorite Guide to XML Schema-Now Extensively Revised for Version 1.1 and Today's Best Practices!

To leverage XML's full power, organizations need shared vocabularies based on XML Schema. For a full decade, Definitive XML Schema has been the most practical, accessible, and usable guide to working with XML Schema. Now, author Priscilla Walmsley has thoroughly updated her classic to fully reflect XML Schema 1.1, and to present new best practices for designing successful schemas.

Priscilla helped create XML Schema as a member of the W3C XML Schema Working Group, so she is well qualified to explain the W3C recommendation with insight and clarity. Her book teaches practical techniques for writing schemas to support any application, including many new use cases. You'll discover how XML Schema 1.1 provides a rigorous, complete specification for modeling XML document structure, content, and datatypes; and walk through the many aspects of designing and applying schemas, including composition, instance validation, documentation, and namespaces. Then, building on the fundamentals, Priscilla introduces powerful advanced techniques ranging from type derivation to identity constraints. This edition's extensive new coverage includes

  • Many new design hints, tips, and tricks - plus a full chapter on creating an enterprise strategy for schema development and maintenance
  • Design considerations in creating schemas for relational and object-oriented models, narrative content, and Web services
  • An all-new chapter on assertions
  • Coverage of new 1.1 features, including overrides, conditional type assignment, open content and more
  • Modernized rules for naming and design
  • Substantially updated coverage of extensibility, reuse, and versioning
  • And much more

If you're an XML developer, architect, or content specialist, with this Second Edition you can join the tens of thousands who rely on Definitive XML Schema for practical insights, deeper understanding, and solutions that work.



Autorentext

PRISCILLA WALMSLEYserves as Managing Director of Datypic, a consultancy specializing in XML architecture and design, SOA and Web services implementation, and content management.



Inhalt

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 attributedeclarations? 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 val…

Titel
Definitive XML Schema
EAN
9780132886765
Format
PDF
Hersteller
Veröffentlichung
04.09.2012
Digitaler Kopierschutz
Wasserzeichen
Dateigrösse
3.66 MB
Anzahl Seiten
768