Book description
With the XQuery 1.0 standard, you finally have a tool that will make it much easier to search, extract and manipulate information from XML content stored in databases. This in-depth tutorial not only walks you through the XQuery specification, but also teaches you how to program with this widely anticipated query language.
XQuery is for query writers who have some knowledge of XML basics, but not necessarily advanced knowledge of XML-related technologies. It can be used both as a tutorial, by reading cover to cover, and as a reference, by using the comprehensive index and appendixes. Either way, you will find the background knowledge in namespaces, schemas, built-in types and regular expressions that is relevant to writing XML queries. This book provides:
A high-level overview and quick tour of XQuery
Information to write sophisticated queries, without being bogged down by the details of types, namespaces, and schemas
Advanced concepts for users who want to take advantage of modularity, namespaces, typing and schemas
Guidelines for working with specific types of data, such as numbers, strings, dates, URIs and processing instructions
A complete alphabetical reference to the built-in functions and types
You will also learn about XQuery's support for filtering, sorting, and grouping data, as well as how to use FLWOR expressions, XPath, and XQuery tools for extracting and combining information. With this book, you will discover how to apply all of these tools to a wide variety of data sources, and how to recombine information from multiple sources into a single final output result.
Whether you're coming from SQL, XSLT, or starting from scratch, this carefully paced tutorial takes you through the final 1.0 standard in detail.
Table of contents
-
XQuery
- A Note Regarding Supplemental Files
- Preface
- 1. Introduction to XQuery
- 2. XQuery Foundations
- 3. Expressions: XQuery Building Blocks
- 4. Navigating Input Documents Using Paths
-
5. Adding Elements and Attributes to Results
- 5.1. Including Elements and Attributes from the Input Document
-
5.2. Direct Element Constructors
- 5.2.1. Containing Literal Characters
- 5.2.2. Containing Other Element Constructors
- 5.2.3. Containing Enclosed Expressions
- 5.2.4. Specifying Attributes Directly
- 5.2.5. Declaring Namespaces in Direct Constructors
- 5.2.6. Use Case: Modifying an Element from the Input Document
- 5.2.7. Direct Element Constructors and Whitespace
- 5.3. Computed Constructors
- 6. Selecting and Joining Using FLWORs
- 7. Sorting and Grouping
- 8. Functions
- 9. Advanced Queries
-
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
- 11. A Closer Look at Types
- 12. Queries, Prologs, and Modules
- 13. Using Schemas with XQuery
- 14. Static Typing
- 15. Principles of Query Design
- 16. Working with Numbers
- 17. Working with Strings
-
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
- 19. Working with Dates, Times, and Durations
- 20. Working with Qualified Names, URIs, and IDs
- 21. Working with Other XML Components
- 22. Additional XQuery-Related Standards
- 23. Implementation-Specific Features
-
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
- 25. XQuery for XSLT Users
- A. Built-in Function Reference
-
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
-
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
- Index
- Index
- Colophon
Product information
- Title: XQuery
- Author(s):
- Release date: March 2007
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596006341
You might also like
book
XQuery: The XML Query Language
“An excellent, early look at the emerging XML Query standard. The chapters on surprises and gotchas …
book
XPath and XPointer
Referring to specific information inside an XML document is a little like finding a needle in …
book
XQuery, 2nd Edition
The W3C XQuery 3.1 standard provides a tool to search, extract, and manipulate content, whether it's …
book
XQuery from the Experts: A Guide to the W3C XML Query Language
"The individual perspectives on the concepts behind the XQuery language offered by XQuery from the Experts …