Beginning XML

cover image

Where to find it

Information & Library Science Library

Call Number
QA76.76.H94 B439 2012
Status
Available

Summary

A complete update covering the many advances to the XML language

The XML language has become the standard for writing documents on the Internet and is constantly improving and evolving. This new edition covers all the many new XML-based technologies that have appeared since the previous edition four years ago, providing you with an up-to-date introductory guide and reference. Packed with real-world code examples, best practices, and in-depth coverage of the most important and relevant topics, this authoritative resource explores both the advantages and disadvantages of XML and addresses the most current standards and uses of XML.

Features the most updated content built on audience feedback from the previous edition as well as the vast knowledge from XML developer teams Boasts new chapters on RELAX NG and Schematron, XML functionality in databases, LINQ to XML, Jabber and XMLPP, XHTML, HTML5, and more Offers in-depth coverage on extracting data from XML and updated material on Web Services

Beginning XML, Fifth Edition delivers the most important aspects of XML in regard to what it is, how it works, what technologies surround it, and how it can best be used in a variety of situations.

Contents

  • Introduction p. XXVII
  • Part I Introducing Xml
  • Chapter 1 What Is Xml? p. 3
  • Steps Leading up to XML: Data Representation and Markups p. 4
  • Binary Files p. 4
  • Text Files p. 5
  • A Brief History of Markup p. 6
  • The Birth of XML p. 6
  • More Advantages of XML p. 10
  • XML Rules p. 10
  • Hierarchical Data Representation p. 11
  • Interoperability p. 12
  • XML in Practice p. 13
  • Data Versus Document p. 13
  • XML Scenarios p. 14
  • XML Technologies p. 16
  • Summary p. 23
  • Chapter 2 WELL-FORMED XML p. 25
  • What Does Well-Formed Mean? p. 26
  • Creating XML in a Text Editor p. 26
  • Forbidden Characters p. 26
  • XML Prolog p. 27
  • Creating Elements p. 30
  • Attributes p. 33
  • Element and Attribute Content p. 34
  • Processing Instructions p. 38
  • CDATA Sections p. 39
  • Advanced XML Parsing p. 40
  • XML Equivalence p. 41
  • Whitespace Handling p. 42
  • Error Handling p. 44
  • The XML Infoset p. 47
  • The Document Information Item p. 48
  • Element Information Items p. 48
  • Attribute Information Items p. 48
  • Processing Instruction Information Items p. 48
  • Character Information Item p. 49
  • Comment Information Item p. 49
  • Namespace Information Item p. 49
  • The Document Type Declaration Information Item p. 49
  • Unexpanded Entity Reference Information Item p. 49
  • Unparsed Entity Information Item p. 49
  • Notation Information Item p. 49
  • Summary p. 50
  • Chapter 3 Xml Namespaces p. 53
  • Defi ning Namespaces p. 54
  • Why Do You Need Namespaces? p. 54
  • How Do You Choose a Namespace? p. 56
  • URLs, URIs, and URNs p. 56
  • Creating Your First Namespace p. 57
  • How to Declare a Namespace p. 58
  • How Exactly Does Scope Work? p. 62
  • Declaring More Than One Namespace p. 62
  • Changing a Namespace Declaration p. 64
  • Namespace Usage in the Real World p. 68
  • XML Schema p. 68
  • Documents with Multiple Namespaces p. 68
  • When to Use and Not Use Namespaces p. 72
  • When Namespaces are Needed p. 72
  • When Namespaces Are Not Needed p. 73
  • Versioning and Namespaces p. 74
  • Common Namespaces p. 75
  • The XML Namespace p. 75
  • The XMLNS Namespace p. 76
  • The XML Schema Namespace p. 76
  • The XSLT Namespace p. 76
  • The SOAP Namespaces p. 77
  • The WSDL Namespace p. 77
  • The Atom Namespace p. 77
  • The MathML Namespace p. 77
  • The Docbook Namespace p. 78
  • Summary p. 78
  • Part II Validation
  • Chapter 4 Document Type Definitions p. 83
  • What Are Document Type Defi nitions? p. 83
  • Working with DTDs p. 84
  • Using jEdit p. 84
  • The Document Type Declaration in Detail p. 88
  • Sharing DTDs p. 92
  • Anatomy of a DTD p. 93
  • Element Declarations p. 93
  • Attribute Declarations p. 103
  • Entity Declarations p. 109
  • DTD Limitations p. 114
  • Summary p. 114
  • Chapter 5 Xml Schemas p. 117
  • Benefi ts of XML Schemas p. 118
  • XML Schemas Use XML Syntax p. 118
  • XML Schema Namespace Support p. 118
  • XML Schema Data Types p. 119
  • XML Schema Content Models p. 119
  • XML Schema Specifi cations p. 119
  • XML Schemas in Practice p. 120
  • Defi ning XML Schemas p. 124
  • Declarations p. 124
  • Declarations p. 128
  • Mixed Content p. 138
  • Declarations p. 139
  • Declarations p. 141
  • An XML Schema for Contacts p. 141
  • Data Types p. 148
  • Declarations p. 155
  • Creating a Schema from Multiple Documents p. 161
  • Declarations p. 161
  • Declarations p. 165
  • Documenting XML Schemas p. 167
  • XML Schema 1.1 p. 170
  • Relaxed Rules p. 170
  • Summary p. 171
  • Chapter 6 Relax Ng And Schematron p. 175
  • Why Do You Need More Ways of Validating XML? p. 176
  • Setting Up Your Environment p. 176
  • Using RELAX NG p. 177
  • Understanding the Basics of RELAX NG p. 177
  • Understanding RELAX NG's Compact Syntax p. 183
  • Converting Between the Two RELAX NG Formats p. 185
  • Constraining Content p. 186
  • Reusing Code in RELAX NG Schema p. 189
  • Using Schematron p. 193
  • Understanding the Basics of Schematron p. 193
  • Choosing a Version of Schematron p. 194
  • Understanding the Basic Process p. 194
  • Writing Basic Rules in Schematron p. 195
  • Creating a Schematron Document p. 196
  • Adding More Information to Messages p. 197
  • Constraining Values in Schematron p. 200
  • Handling Co-Constraints in Schematron p. 202
  • Using Schematron from Within XML Schema p. 203
  • Summary p. 207
  • Part III Processing
  • Chapter 7 Extracting Data From Xml p. 211
  • Document Models: Representing XML in Memory p. 211
  • Meet the Models: DOM, XDM, and PSVI p. 212
  • A Sample DOM Tree p. 212
  • DOM Node Types p. 213
  • DOM Node Lists p. 214
  • The Limitations of DOM p. 215
  • The XPath Language p. 216
  • XPath Basics p. 216
  • XPath Predicates: The Full Story p. 218
  • XPath Steps and Axes p. 220
  • XPath Expressions p. 222
  • Variables in XPath Expressions p. 226
  • New Expressions in XPath 2 p. 227
  • XPath Functions p. 231
  • XPath Set Operations p. 234
  • XPath and Namespaces p. 234
  • Summary p. 236
  • Chapter 8 XSLT p. 239
  • What XSLT Is Used For p. 240
  • XSLT as a Declarative Language p. 240
  • How Is XSLT a Functional Language? p. 242
  • Setting Up Your XSLT Development Environment p. 242
  • Setting Up Saxon for .NET p. 243
  • Setting Up Saxon for Java p. 244
  • Foundational XSLT Elements p. 245
  • The Element p. 246
  • The Element p. 247
  • The Element p. 251
  • The Element p. 251
  • The Element p. 253
  • Push-Processing versus Pull-Processing p. 254
  • The Role of XPath in XSLT p. 254
  • Using Named Templates p. 256
  • The Element p. 259
  • The document() Function in XSLT p. 260
  • Conditional Logic p. 266
  • The element p. 270
  • The Element p. 271
  • and Elements p. 273
  • Reusing Code in XSLT p. 276
  • The Element p. 276
  • The Element p. 279
  • The Mode Attribute p. 280
  • Understanding Built-In Templates and Built-In Rules p. 282
  • Using XSLT 2.0 p. 284
  • Understanding Data Types in XSLT 2.0 p. 285
  • Creating User-Defi ned Functions p. 285
  • Creating Multiple Output Documents p. 290
  • Using the collection() Function p. 291
  • Grouping in XSLT 2.0 p. 292
  • Handling Non-XML Input with XSLT 2.0 p. 295
  • XSLT and XPath 3.0: What's Coming Next? p. 302
  • Summary p. 303
  • Part IV Databases
  • Chapter 9 Xquery p. 307
  • XQuery, XPath, and XSLT p. 308
  • XQuery and XSLT p. 308
  • XQuery and XPath p. 308
  • XQuery in Practice p. 309
  • Standalone XQuery Applications p. 309
  • Part of SQL p. 309
  • Callable from Java or Other Languages p. 309
  • A Native-XML Server p. 310
  • XQuery Anywhere p. 310
  • Building Blocks of XQuery p. 313
  • FLWOR Expressions, Modules, and Functions p. 313
  • XQuery Expressions Do Not Have a Default Context p. 317
  • The Anatomy of a Query Expression p. 318
  • The Version Declaration p. 318
  • The Query Prolog p. 319
  • The Query Body p. 325
  • Some Optional XQuery Features p. 332
  • XQuery and XPath Full Text p. 332
  • The XQuery Update Facility p. 333
  • XQuery Scripting Extension p. 333
  • Coming in XQuery 3.0 p. 333
  • Grouping and Windowing p. 334
  • The count Clause p. 335
  • Try and Catch p. 335
  • switch Expressions p. 336
  • Function Items and Higher Order Functions p. 337
  • JSON Features p. 338
  • XQuery, Linked Data, and the Semantic Web p. 338
  • Summary p. 338
  • Chapter 10 Xml And Databases p. 341
  • Understanding Why Databases Need to Handle XML p. 341
  • Analyzing which XML Features are Needed in a Database p. 343
  • Retrieving Documents p. 343
  • Retrieving Data from Documents p. 343
  • Updating XML Documents p. 344
  • Displaying Relational Data as XML p. 344
  • Presenting XML as Relational Data p. 344
  • Using MySQL with XML p. 345
  • Installing MySQL p. 345
  • Adding Information in MySQL p. 345
  • Querying MySQL p. 348
  • Updating XML in MySQL p. 353
  • Usability of XML in MySQL p. 353
  • Client-Side XML Support p. 354
  • Using SQL Server with XML p. 355
  • Installing SQL Server p. 355
  • Presenting Relational Data as XML p. 356
  • Understanding the xml Data Type p. 371
  • Creating Indexes with the xml Data Type p. 374
  • W3C XML Schema in SQL Server p. 384
  • Dealing with Namespaced Documents p. 385
  • Using eXist with XML p. 386
  • Downloading and Installing eXist p. 387
  • Interacting with eXist p. 389
  • Summary p. 399
  • Part V Programming
  • Chapter 11 Event-Driven Programming p. 403
  • Understanding Sequential Processing p. 404
  • Using SAX in Sequential Processing p. 404
  • Preparing to Run the Examples p. 405
  • Receiving SAX Events p. 406
  • Handling Invalid Content p. 417
  • Using the DTDHandler Interface p. 427
  • EntityResolver Interface p. 428
  • Understanding Features and Properties p. 429

Subjects

Subject Headings A:

Other details