Preface; Contents of This Book; Reading the Syntax Diagrams; Conventions Used in This Book; Using Code Examples; Useful Functions; We''d Like to Hear from You; Acknowledgments;Chapter 1: Introduction to XQuery; 1.1 What Is XQuery?; 1.2 Easing into XQuery; 1.3 Path Expressions; 1.4 FLWORs; 1.5 Adding XML Elements and Attributes; 1.6 Functions; 1.7 Joins; 1.
8 Aggregating and Grouping Values;Chapter 2: XQuery Foundations; 2.1 The Design of the XQuery Language; 2.2 XQuery in Context; 2.3 Processing Queries; 2.4 The XQuery Data Model; 2.5 Types; 2.6 Namespaces;Chapter 3: Expressions: XQuery Building Blocks; 3.1 Categories of Expressions; 3.
2 Keywords and Names; 3.3 Whitespace in Queries; 3.4 Literals; 3.5 Variables; 3.6 Function Calls; 3.7 Comments; 3.8 Evaluation Order and Parentheses; 3.9 Comparison Expressions; 3.
10 Conditional (if-then-else) Expressions; 3.11 Logical (and/or) Expressions;Chapter 4: Navigating Input Documents Using Paths; 4.1 Path Expressions; 4.2 Predicates; 4.3 Dynamic Paths; 4.4 Input Documents; 4.5 A Closer Look at Context;Chapter 5: Adding Elements and Attributes to Results; 5.1 Including Elements and Attributes from the Input Document; 5.
2 Direct Element Constructors; 5.3 Computed Constructors;Chapter 6: Selecting and Joining Using FLWORs; 6.1 Selecting with Path Expressions; 6.2 FLWOR Expressions; 6.3 Quantified Expressions; 6.4 Selecting Distinct Values; 6.5 Joins;Chapter 7: Sorting and Grouping; 7.1 Sorting in XQuery; 7.
2 Grouping; 7.3 Aggregating Values;Chapter 8: Functions; 8.1 Built-in Versus User-Defined Functions; 8.2 Calling Functions; 8.3 User-Defined Functions;Chapter 9: Advanced Queries; 9.1 Copying Input Elements with Modifications; 9.2 Working with Positions and Sequence Numbers; 9.3 Combining Results; 9.
4 Using Intermediate XML Documents;Chapter 10: Namespaces and XQuery; 10.1 XML Namespaces; 10.2 Namespaces and XQuery; 10.3 Namespace Declarations in Queries; 10.4 Controlling Namespace Declarations in Your Results;Chapter 11: A Closer Look at Types; 11.1 The XQuery Type System; 11.2 The Built-in Types; 11.3 Types, Nodes, and Atomic Values; 11.
4 Type Checking in XQuery; 11.5 Automatic Type Conversions; 11.6 Sequence Types; 11.7 Constructors and Casting;Chapter 12: Queries, Prologs, and Modules; 12.1 Structure of a Query: Prolog and Body; 12.2 Assembling Queries from Multiple Modules; 12.3 Variable Declarations; 12.4 Declaring External Functions;Chapter 13: Using Schemas with XQuery; 13.
1 What Is a Schema?; 13.2 Why Use Schemas with Queries?; 13.3 W3C XML Schema: A Brief Overview; 13.4 In-Scope Schema Definitions; 13.5 Schema Validation and Type Assignment; 13.6 Sequence Types and Schemas;Chapter 14: Static Typing; 14.1 What Is Static Typing?; 14.2 The Typeswitch Expression; 14.
3 The Treat Expression; 14.4 Type Declarations; 14.5 The zero-or-one, one-or-more, and exactly-one Functions;Chapter 15: Principles of Query Design; 15.1 Query Design Goals; 15.2 Clarity; 15.3 Modularity; 15.4 Robustness; 15.5 Error Handling; 15.
6 Performance;Chapter 16: Working with Numbers; 16.1 The Numeric Types; 16.2 Constructing Numeric Values; 16.3 Comparing Numeric Values; 16.4 Arithmetic Operations; 16.5 Functions on Numbers;Chapter 17: Working with Strings; 17.1 The xs:string Type; 17.2 Constructing Strings; 17.
3 Comparing Strings; 17.4 Substrings; 17.5 Finding the Length of a String; 17.6 Concatenating and Splitting Strings; 17.7 Manipulating Strings; 17.8 Whitespace and Strings; 17.9 Internationalization Considerations;Chapter 18: Regular Expressions; 18.1 The Structure of a Regular Expression; 18.
2 Representing Individual Characters; 18.3 Representing Any Character; 18.4 Representing Groups of Characters; 18.5 Character Class Expressions; 18.6 Reluctant Quantifiers; 18.7 Anchors; 18.8 Back-References; 18.9 Using Flags; 18.
10 Using Sub-Expressions with Replacement Variables;Chapter 19: Working with Dates, Times, and Durations; 19.1 The Date and Time Types; 19.2 The Duration Types; 19.3 Extracting Components of Dates, Times, and Durations; 19.4 Using Arithmetic Operators on Dates, Times, and Durations; 19.5 The Date Component Types;Chapter 20: Working with Qualified Names, URIs, and IDs; 20.1 Working with Qualified Names; 20.2 Working with URIs; 20.
3 Working with IDs;Chapter 21: Working with Other XML Components; 21.1 XML Comments; 21.2 Processing Instructions; 21.3 Documents; 21.4 Text Nodes; 21.5 XML Entity and Character References; 21.6 CDATA Sections;Chapter 22: Additional XQuery-Related Standards; 22.1 Serialization; 22.
2 XQueryX; 22.3 XQuery Update Facility; 22.4 Full-Text Search; 22.5 XQuery API for Java (XQJ);Chapter 23: Implementation-Specific Features; 23.1 Conformance; 23.2 XML Version Support; 23.3 Setting the Query Context; 23.4 Option Declarations and Extension Expressions; 23.
5 Specifying Serialization Parameters;Chapter 24: XQuery for SQL Users; 24.1 Relational Versus XML Data Models; 24.2 Comparing SQL Syntax with XQuery Syntax; 24.3 Combining SQL and XQuery; 24.4 SQL/XML;Chapter 25: XQuery for XSLT Users; 25.1 XQuery and XPath; 25.2 XQuery Versus XSLT; 25.3 Differences Between XQuery 1.
0/XPath 2.0 and XPath 1.0;Appendix A: Built-in Function Reference;Appendix B: Built-in Types; B.1 xs:anyAtomicType; B.2 xs:anyType; B.3 xs:anyURI; B.4 xs:base64Binary; B.5 xs:boolean; B.
6 xs:byte; B.7 xs:date; B.8 xs:dateTime; B.9 xs:dayTimeDuration; B.10 xs:decimal; B.11 xs:double; B.12 xs:duration; B.13 xs:ENTITIES; B.
14 xs:ENTITY; B.15 xs:float; B.16 xs:gDay; B.17 xs:gMonth; B.18 xs:gMonthDay; B.19 xs:gYear; B.20 xs:gYearMonth; B.21 xs:hexBinary; B.
22 xs:ID; B.23 xs:IDREF; B.24 xs:IDREFS; B.25 xs:int; B.26 xs:integer; B.27 xs:language; B.28 xs:long; B.29 xs:Name; B.
30 xs:NCName; B.31 xs:negativeInteger; B.32 xs:NMTOKEN; B.33 xs:NMTOKENS; B.34 xs:nonNegativeInteger; B.35 xs:nonPositiveInteger; B.36 xs:normalizedString; B.37 xs:NOTATION; B.
38 xs:positiveInteger; B.39 xs:QName; B.40 xs:short; B.41 xs:string; B.42 xs:time; B.43 xs:token; B.44 xs:unsignedByte; B.45 xs:unsignedInt; B.
46 xs:unsignedLong; B.47 xs:unsignedShort; B.48 xs:untyped; B.49 xs:untypedAtomic; B.50 xs:yearMonthDuration;Appendix C: Error Summary; C.1 FOAR0001; C.2 FOAR0002; C.3 FOCA0001; C.
4 FOCA0002; C.5 FOCA0003; C.6 FOCA0005; C.7 FOCA0006; C.8 FOCH0001; C.9 FOCH0002; C.10 FOCH0003; C.11 FOCH0004; C.
12 FODC0001; C.13 FODC0002; C.14 FODC0003; C.15 FODC0004; C.16 FODC0005; C.17 FODT0001; C.18 FODT0002; C.19 FODT0003; C.
20 FOER0000; C.21 FONS0004; C.22 FONS0005; C.23 FORG0001; C.24 FORG0002; C.25 FORG0003; C.26 FORG0004; C.27 FORG0005; C.
28 FORG0006; C.29 FORG0008; C.30 FORG0009; C.31 FORX0001; C.32 FORX0002; C.33 FORX0003; C.34 FORX0004; C.35 FOTY0012; C.
36 SENR0001; C.37 SEPM0004; C.38 SEPM0009; C.39 SEPM0010; C.40 SEPM0016; C.41 SERE0003; C.42 SERE0005; C.43 SERE0006; C.
44 SERE0008; C.45 SERE0012; C.46 SERE0014; C.47 SERE0015; C.48 SESU0007; C.49 SESU0011; C.50 SESU0013; C.51 XPDY0002; C.
52 XPDY0050; C.53 XPST0001; C.54 XPST0003; C.55 XPST0005; C.56 XPST0008; C.57 XPST0010; C.58 XPST0017; C.59 XPST0051; C.
60 XPST0080; C.61 XPST0081; C.62 XPTY0004; C.63 XPTY0018; C.64 XPTY0019; C.65 XPTY0020; C.66 XQDY0025; C.67 XQDY0026; C.
68 XQDY0027; C.69 XQDY0041; C.70 XQDY0044; C.71 XQDY0061; C.72 XQDY0064; C.73 XQDY0072; C.74 XQDY0074; C.75 XQDY0084; C.
76 XQDY0091; C.77 XQDY0092; C.78 XQST0009; C.79 XQST0012; C.80 XQST0013; C.81 XQST0016; C.82 XQST0022; C.83 XQST0031; C.
84 XQST0032; C.85 XQST0033; C.86 XQST0034; C.87 XQST0035; C.88 XQST0036; C.89 XQST0038; C.90 XQST0039; C.91 XQST0040; C.
92 XQST0045; C.93 XQST0046; C.94 XQST0047; C.95 XQST0048; C.96 XQST0049; C.97 XQST0054; C.98 XQST0055; C.99 XQST0057; C.
100 XQST0058; C.101 XQST0059; C.102 XQST0060; C.103 XQST0065; C.104 XQST0066; C.105 XQST0067; C.106 XQST0068; C.107 XQST0069; C.
108 XQST0070; C.109 XQST0071; C.110 XQST0073; C.111 XQST0075; C.112 XQST0076; C.113 XQST0079; C.114 XQST0085; C.115 XQST0087; C.
116 XQST0088; C.117 XQST0089; C.118 XQST0090; C.119 XQST0093; C.120 XQTY0024; C.121 XQTY0030; C.122 XQTY0086;Colophon;.