O'Reilly - XML Schema.pdf
(
4364 KB
)
Pobierz
15494249 UNPDF
XML Schema
Eric van der Vlist
Publisher: O'Reilly
First Edition June 2002
ISBN: 0-596-00252-1, 400 pages
Table of Contents
Index
Full Description
Reviews
Reader reviews
Errata
The W3C's XML Schema offers a powerful set of tools for defining
acceptable XML document structures and content. While schemas are
powerful, that power comes with substantial complexity. This book
explains XML Schema foundations, a variety of different styles for writing
schemas, simple and complex types, datatypes and facets, keys,
extensibility, documentation, design choices, best practices, and limitations.
Complete with references, a glossary, and examples throughout.
Table of Content
Table of Content ............................................................................................................. 2
Preface............................................................................................................................. 8
Who Should Read This Book?.................................................................................... 8
Who Should Not Read This Book?............................................................................. 8
About the Examples .................................................................................................... 8
Organization of This Book.......................................................................................... 9
Conventions Used in This Book ............................................................................... 11
How to Contact Us.................................................................................................... 11
Acknowledgments..................................................................................................... 12
Chapter 1. Schema Uses and Development .................................................................. 13
1.1 What Schemas Do for XML ............................................................................... 13
1.2 W3C XML Schema............................................................................................. 15
Chapter 2. Our First Schema......................................................................................... 17
2.1 The Instance Document ...................................................................................... 17
2.2 Our First Schema ................................................................................................ 18
2.3 First Findings ...................................................................................................... 24
Chapter 3. Giving Some Depth to Our First Schema.................................................... 26
3.1 Working From the Structure of the Instance Document ..................................... 26
3.2 New Lessons ....................................................................................................... 28
Chapter 4. Using Predefined Simple Datatypes............................................................ 32
4.1 Lexical and Value Spaces ................................................................................... 32
4.2 Whitespace Processing........................................................................................ 34
4.3 String Datatypes.................................................................................................. 34
4.4 Numeric Datatypes.............................................................................................. 42
4.5 Date and Time Datatypes.................................................................................... 45
4.6 List Types............................................................................................................ 53
4.7 What About anySimpleType?............................................................................. 53
4.8 Back to Our Library ............................................................................................ 53
Chapter 5. Creating Simple Datatypes.......................................................................... 56
5.1 Derivation By Restriction ................................................................................... 56
5.2 Derivation By List............................................................................................... 73
5.3 Derivation By Union........................................................................................... 75
5.4 Some Oddities of Simple Types ......................................................................... 76
5.5 Back to Our Library ............................................................................................ 79
Chapter 6. Using Regular Expressions to Specify Simple Datatypes........................... 82
6.1 The Swiss Army Knife........................................................................................ 82
6.2 The Simplest Possible Patterns ........................................................................... 82
6.3 Quantifying ......................................................................................................... 83
6.4 More Atoms ........................................................................................................ 84
6.5 Common Patterns................................................................................................ 92
6.6 Back to Our Library ............................................................................................ 96
Chapter 7. Creating Complex Datatypes ...................................................................... 99
7.1 Simple Versus Complex Types........................................................................... 99
7.2 Examining the Landscape ................................................................................... 99
7.3 Simple Content Models..................................................................................... 100
7.4 Complex Content Models ................................................................................. 103
7.5 Mixed Content Models ..................................................................................... 127
7.6 Empty Content Models ..................................................................................... 131
7.7 Back to Our Library .......................................................................................... 133
7.8 Derivation or Groups ........................................................................................ 138
Chapter 8. Creating Building Blocks .......................................................................... 139
8.1 Schema Inclusion .............................................................................................. 139
8.2 Schema Inclusion with Redefinition ................................................................. 141
8.3 Other Alternatives ............................................................................................. 146
8.4 Simplifying the Library..................................................................................... 148
Chapter 9. Defining Uniqueness, Keys, and Key References..................................... 153
9.1 xs:ID and xs:IDREF.......................................................................................... 153
9.2 XPath-Based Identity Checks ........................................................................... 154
9.3 ID/IDREF Versus xs:key/xs:keyref .................................................................. 161
9.4 Using
xs:key
and
xs:unique
As Co-occurrence Constraints ......................... 163
Chapter 10. Controlling Namespaces ......................................................................... 166
10.1 Namespaces Present Two Challenges to Schema Languages......................... 166
10.2 Namespace Declarations ................................................................................. 169
10.3 To Qualify Or Not to Qualify?........................................................................ 171
10.4 Disruptive Attributes....................................................................................... 177
10.5 Namespaces and XPath Expressions .............................................................. 178
10.6 Referencing Other Namespaces ...................................................................... 179
10.7 Schemas for XML, XML Base and XLink ..................................................... 182
10.8 Namespace Behavior of Imported Components ............................................. 188
10.9 Importing Schemas with No Namespaces ...................................................... 190
10.10 Chameleon Design ........................................................................................ 192
10.11 Allowing Any Elements or Attributes from a Particular Namespace........... 194
Chapter 11. Referencing Schemas and Schema Datatypes in XML Documents ....... 197
11.1 Associating Schemas with Instance Documents............................................. 197
11.2 Defining Element Types ................................................................................. 201
11.3 Defining Nil (Null) Values ............................................................................. 206
11.4 Beware the Intrusive Nature of These Features... ........................................... 208
Chapter 12. Creating More Building Blocks Using Object-Oriented Features .......... 209
12.1 Substitution Groups ........................................................................................ 209
12.2 Controlling Derivations .................................................................................. 217
Chapter 13. Creating Extensible Schemas .................................................................. 225
13.1 Extensible Schemas ........................................................................................ 225
13.2 The Need for Open Schemas .......................................................................... 233
Chapter 14. Documenting Schemas ............................................................................ 236
14.1 Style Matters ................................................................................................... 236
14.2 The W3C XML Schema Annotation Element ................................................ 237
14.3 Foreign Attributes ........................................................................................... 242
14.4 XML 1.0 Comments ....................................................................................... 244
14.5 Which One and What For? ............................................................................. 244
Chapter 15. Elements Reference Guide ...................................................................... 246
xs:all(outside a group)............................................................................................. 247
xs:all(within a group).............................................................................................. 249
xs:annotation ........................................................................................................... 250
xs:any ...................................................................................................................... 252
xs:anyAttribute........................................................................................................ 255
xs:appinfo................................................................................................................ 257
xs:attribute(global definition) ................................................................................. 260
xs:attribute(reference or local definition) ............................................................... 262
xs:attributeGroup(global definition) ....................................................................... 265
xs:attributeGroup(reference)................................................................................... 266
xs:choice(outside a group) ...................................................................................... 267
xs:choice(within a group) ....................................................................................... 269
xs:complexContent ................................................................................................. 270
xs:complexType(global definition)......................................................................... 272
xs:complexType(local definition) ........................................................................... 274
xs:documentation .................................................................................................... 276
xs:element(global definition) .................................................................................. 278
xs:element(within xs:all)......................................................................................... 282
xs:element(reference or local definition) ................................................................ 285
xs:enumeration ........................................................................................................ 289
xs:extension(simple content) .................................................................................. 291
xs:extension(complex content) ............................................................................... 293
xs:field..................................................................................................................... 295
xs:fractionDigits...................................................................................................... 297
xs:group(definition) ................................................................................................ 299
xs:group(reference) ................................................................................................. 301
xs:import ................................................................................................................. 303
xs:include ................................................................................................................ 306
xs:key ...................................................................................................................... 308
xs:keyref.................................................................................................................. 310
xs:length.................................................................................................................. 314
xs:list ....................................................................................................................... 316
xs:maxExclusive ..................................................................................................... 318
xs:maxInclusive ...................................................................................................... 320
xs:maxLength.......................................................................................................... 322
xs:minExclusive...................................................................................................... 324
xs:minInclusive ....................................................................................................... 326
xs:minLength .......................................................................................................... 328
xs:notation............................................................................................................... 330
xs:pattern................................................................................................................. 332
xs:redefine............................................................................................................... 334
xs:restriction(simple type) ...................................................................................... 336
xs:restriction(simple content).................................................................................. 338
xs:restriction(complex content) .............................................................................. 340
xs:schema ................................................................................................................ 342
xs:selector ............................................................................................................... 344
xs:sequence(outside a group) .................................................................................. 346
xs:sequence(within a group) ................................................................................... 348
xs:simpleContent..................................................................................................... 349
xs:simpleType(global definition)............................................................................ 350
xs:simpleType(local definition) .............................................................................. 352
xs:totalDigits ........................................................................................................... 354
xs:union................................................................................................................... 356
xs:unique ................................................................................................................. 358
xs:whiteSpace ......................................................................................................... 360
Chapter 16. Datatype Reference Guide ...................................................................... 362
xs:anyURI ............................................................................................................... 363
xs:base64Binary...................................................................................................... 365
xs:boolean ............................................................................................................... 367
xs:byte ..................................................................................................................... 368
xs:date ..................................................................................................................... 369
xs:dateTime............................................................................................................. 371
xs:decimal ............................................................................................................... 373
xs:double ................................................................................................................. 374
xs:duration............................................................................................................... 376
xs:ENTITIES .......................................................................................................... 378
xs:ENTITY ............................................................................................................. 380
xs:float..................................................................................................................... 381
xs:gDay ................................................................................................................... 383
xs:gMonth ............................................................................................................... 385
xs:gMonthDay......................................................................................................... 387
xs:gYear .................................................................................................................. 389
xs:gYearMonth ....................................................................................................... 390
xs:hexBinary ........................................................................................................... 392
xs:ID........................................................................................................................ 394
xs:IDREF ................................................................................................................ 396
xs:IDREFS .............................................................................................................. 398
xs:int........................................................................................................................ 400
xs:integer................................................................................................................. 402
xs:language ............................................................................................................. 403
xs:long..................................................................................................................... 404
xs:Name .................................................................................................................. 405
xs:NCName............................................................................................................. 406
xs:negativeInteger ................................................................................................... 407
xs:NMTOKEN........................................................................................................ 408
xs:NMTOKENS...................................................................................................... 409
xs:nonNegativeInteger ............................................................................................ 411
xs:nonPositiveInteger.............................................................................................. 412
Plik z chomika:
niccoaku
Inne pliki z tego folderu:
O'Reilly - Cgi Programming With Perl, 2Nd Edition 2000.chm
(1376 KB)
O'Reilly - CGI Programming.pdf
(1546 KB)
O'Reilly - Cisco Cookbook.chm
(1491 KB)
O'Reilly - Cisco IOS Access Lists.pdf
(1425 KB)
O'Reilly - Cisco IOS in a Nutshell.pdf
(4975 KB)
Inne foldery tego chomika:
~ Świetlana Rodzina
~ Ziemia Zwiastunow Switu
▬Woda utleniona
▼ Sam Naprawiam - Zestaw Ebook'ów (samochody - lista w środku) ═══════════════
1062-Ebooks-Książki-Techniczne
Zgłoś jeśli
naruszono regulamin