Chapter
2 GROUNDWORK 25
2.1 XML: A Language Factory 26
2.2 XML Basics 27
2.2.1 The Syntax 27
2.2.2 The XML Information Model
33
2.3 Schema Definition—Stage 1
34
2.3.1 The Document Type
Definition (DTD) 35
2.3.2 Advanced Topics 38
2.4 Schema Definition—Stage 2
39
2.4.1 DTD Deficiencies 39
2.4.2 XML Schema 40
2.5 Access and Composition 53
2.5.1 Xpath 53
2.5.2 Xpointer 54
2.5.3 Xinclude 57
2.5.4 XML Base 58
2.6 Querying XML 59
2.6.1 Expression Types 60
2.6.2 Discussion 64
2.7 XSL (Extensible Stylesheet Language)
64
2.8 XML APIs 65
2.8.1 SAX 65
2.8.2 DOM 66
2.8.3 Binding 67
2.8.4 Which API? 67
2.9 Schema Definition—Stage 3
68
2.9.1 A Feather Duster for XML
Schemata 68
2.9.2 Elements versus
Attributes 70
2.9.3 XML Design Patterns 74
2.9.4 Architectural Forms 76
2.10 Best Practices 79
2.10.1 Always Use Namespaces 79
2.10.2 Do Not Reinvent the
Wheel 79
2.10.3 Multipart Schemata? 80
2.10.4 Avoid External Entities
80
2.10.5 Never Change a Published
Schema 80
2.10.6 Use Only
Version-Controlled Schemata 80
2.10.7 Consider Equipping Each
Document Element with a UUID Attribute 81
2.10.8 Adopt a Concise Style
for Schema Design 81
2.10.9 Do Not Use Exotic
Language Elements 82
2.11 XML Resources 83