XQuery
Priscilla Walmsley (pwalmsley@datypic.com)
ISBN: 0596006349
1st edition, , O'Reilly Media, Inc.
Table of contents
- Chapter 1. Introduction to XQuery
- What is XQuery?
- Easing into XQuery
- Path expressions
- FLWORs
- Adding XML elements and attributes
- Functions
- Joins
- Aggregating and grouping values
- Chapter 2. XQuery foundations
- The design of the XQuery language
- XQuery in context
- Processing queries
- The XQuery data model
- Namespaces
- Chapter 3. Expressions: XQuery building blocks
- Categories of expressions
- Keywords and names
- Whitespace in queries
- Literals
- Variables
- Function calls
- Comments
- Evaluation order and parentheses
- Comparison expressions
- Conditional (if-then-else) expressions
- Logical (and/or) expressions
- Chapter 4. Navigating input documents using paths
- Path expressions
- Predicates
- Dynamic paths
- Input documents
- A closer look at context
- Chapter 5. Adding elements and attributes to results
- Including elements and attributes from the input document
- Direct element constructors
- Computed constructors
- Chapter 6. Selecting and joining using FLWORs
- Selecting with path expressions
- FLWOR expressions
- Quantified expressions
- Selecting distinct values
- Joins
- Chapter 7. Sorting and grouping
- Sorting in XQuery
- Grouping
- Aggregating values
- Chapter 8. Functions
- Built-in versus user-defined functions
- Calling functions
- User-defined functions
- Chapter 9. Advanced queries
- Copying Input elements with modifications
- Working with positions and sequence numbers
- Combining results
- Using intermediate XML documents
- Chapter 10. Namespaces and XQuery
- XML namespaces
- Namespaces and XQuery
- Namespace declarations in queries
- Controlling namespace declarations in your results
- Chapter 11. A closer look at types
- The XQuery type system
- The built-in types
- Types, nodes and atomic values
- Type checking in XQuery
- Automatic type conversions
- Sequence types
- Constructors and casting
- Chapter 12. Queries, prologs and modules
- Structure of a query: prolog and body
- Assembling queries from multiple modules
- Variable declarations
- Declaring external functions
- Chapter 13. Using schemas with XQuery
- What is a schema?
- Why use schemas with queries?
- W3C XML Schema: A brief overview
- In-scope schema definitions
- Schema validation and type assignment
- Sequence types and schemas
- Chapter 14. Static typing
- What is static typing?
- The typeswitch expression
- The treat expression
- Type declarations
- The
zero-or-one
,one-or-more
, andexactly-one
functions
- Chapter 15. Principles of query design
- Query design goals
- Clarity
- Modularity
- Robustness
- Error handling
- Performance
- Chapter 16. Working with numbers
- The numeric types
- Constructing numeric values
- Comparing numeric values
- Arithmetic operations
- Functions on numbers
- Chapter 17. Working with strings
- The
xs:string
type - Constructing strings
- Comparing strings
- Substrings
- Finding the length of a string
- Concatenating and splitting strings
- Manipulating strings
- Whitespace and strings
- Internationalization considerations
- The
- Chapter 18. Regular expressions
- The structure of a regular expression
- Representing individual characters
- Representing any character
- Representing groups of characters
- Character class expressions
- Reluctant quantifiers
- Anchors
- Back-references
- Using flags
- Using sub-expressions with replacement variables
- Chapter 19. Working with dates, times and durations
- The date and time types
- The duration types
- Extracting components of dates, times and durations
- Using arithmetic operators on dates, times and durations
- The date component types
- Chapter 20. Working with qualified names, URIs and IDs
- Working with qualified names
- Working with URIs
- Working with IDs
- Chapter 21. Working with other XML components
- XML comments
- Processing instructions
- Documents
- Text nodes
- XML entity and character references
- CDATA sections
- Chapter 22. Additional XQuery-related standards
- Serialization
- XQueryX
- XQuery Update Facility
- Full-Text search
- XQuery API for Java (XQJ)
- Chapter 23. Implementation-specific features
- Conformance
- XML version support
- Setting the Query context
- Option declarations and extension expressions
- Specifying serialization parameters
- Chapter 24. XQuery for SQL users
- Relational versus XML data models
- Comparing SQL syntax to XQuery syntax
- Combining SQL and XQuery
- SQL/XML
- Chapter 25. XQuery for XSLT users
- XQuery and XPath
- XQuery versus XSLT
- Differences between XQuery 1.0/XPath 2.0 and XPath 1.0
- Appendix A. Built-in function reference
- Appendix B. Built-in type reference
- Appendix C. Error code reference