You are previewing eXist.
O'Reilly logo
eXist

Book Description

Get a head start with eXist, the open source NoSQL database and application development platform built entirely around XML technologies. With this hands-on guide, you’ll learn eXist from the ground up, from using this feature-rich database to work with millions of documents to building complex web applications that take advantage of eXist’s many extensions. If you’re familiar with XML—as a student, professor, publisher, or developer—you’ll find that eXist is ideal for all kinds of documents.

Table of Contents

  1. Preface
    1. Welcome
    2. Who Is This Book For?
    3. Conventions Used in This Book
    4. XQuery Filename Conventions
    5. Using Code Examples
    6. Accompanying Source Code
      1. Getting the Source Code
      2. Building and Deploying
    7. Safari® Books Online
    8. How to Contact Us
    9. Acknowledgments
  2. 1. Introduction
    1. What Is eXist?
    2. eXist Compared to Other Database Systems
    3. History
    4. Competitors
      1. Open Source Competitors
      2. Closed Source, Commercial Competitors
    5. Who Is Using eXist, and for What?
    6. Contributing to the Community
      1. Individuals Using eXist
      2. Organizations Using eXist
      3. Authors Using eXist
      4. Developers Using eXist
    7. Additional Resources
  3. 2. Getting Started
    1. Downloading and Installing eXist
      1. Preconditions
      2. Downloading eXist
      3. Things to Decide Before Installing
      4. Installing eXist
      5. Post-Installation Checks
    2. Starting and Stopping eXist with a GUI
    3. Starting and Stopping eXist from the Command Line
    4. A First Tour Around Town
      1. The Dashboard
      2. Playing Around
      3. What’s in Your Database
      4. What’s on Your Disk
      5. The Java Admin Client
    5. Getting Files into and out of the Database
    6. Hello eXist!
      1. Hello Data
      2. Hello XQuery
      3. Hello XSLT
      4. Hello XInclude
      5. Hello XForms
  4. 3. Using eXist 101
    1. Preparations and Basic Application Setup
      1. eXist Terminology
      2. Exporting Documents from eXist
      3. Designing an Application’s Collection Structure and Importing Data
    2. Viewing the Data
    3. Listing the Plays (XML)
      1. Listing with the collection Function
      2. Listing with the xmldb Extension Module
    4. Listing the Plays (HTML)
    5. Analyzing the Plays
    6. Linking the Analysis to the Play Overview
    7. Searching the Plays
      1. Searching Using Straight XQuery
      2. Searching Using an Index
    8. Creating a Log
    9. What’s Next?
  5. 4. Architecture
    1. Deployment Architectures
      1. Embedded Architecture
      2. Client/Server Database Architecture
      3. Web Application Platform Architecture
    2. Storage Architecture
      1. XML Document Storage and Indexing
      2. Binary Document Storage
    3. Efficient XML Processing Architecture
      1. Collections
      2. Documents
      3. Dynamic Level Numbering of Nodes
      4. Dynamic Level Numbering and Updates
      5. Paging and Caching
  6. 5. Working with the Database
    1. The Database’s Content
      1. Help: Where Is My XML?
      2. Terminology
      3. Properties of Collections and Resources
      4. System Collections
      5. Addressing Collections, Resources, and Files
    2. The XPath Collection and Doc Functions in eXist
      1. The collection Function
      2. The doc Function
    3. Querying the Database Using REST
      1. Security
      2. GET Requests
      3. PUT Requests
      4. DELETE Requests
      5. POST Requests
      6. Ad Hoc Querying
    4. Updating Documents
      1. eXist’s XQuery Update Extension
      2. XUpdate
    5. Controlling the Database from Code
      1. Specifying Collections and Resources for the xmldb Extension Module
      2. Getting Information
      3. Creating Resources and Collections
      4. Setting Permissions
      5. Moving, Removing, and Renaming
  7. 6. XQuery for eXist
    1. eXist’s XQuery Implementation
      1. XQuery 1.0 Support
      2. XQuery 3.0 Support
      3. Other XQuery Extras
      4. XQuery Execution
    2. Serialization
      1. Controlling Serialization
      2. Serialization Options
    3. Controlling XQuery Execution
      1. eXist XQuery Pragmas
      2. Limiting Execution Time and Output Size
      3. Other Options
    4. XQuery Documentation with xqDoc
  8. 7. Extension Modules
    1. Types of Extension Modules
      1. Extension Modules Written in Java
      2. Extension Modules Written in XQuery
    2. Enabling Extension Modules
      1. Enabling Java Extension Modules
      2. Enabling XQuery Extension Modules
  9. 8. Security
    1. Security Basics
      1. Users
      2. Groups
      3. Permissions
      4. Default Permissions
    2. Managing Users and Groups
      1. Group Managers
      2. Tools for User and Group Management
    3. User and Group Management with the Java Admin Client
      1. Scenario
      2. Creating a Group
      3. Creating Users
      4. Setting Group Managers
    4. Managing Permissions
      1. Tools for Permission Management
      2. Permission Management with the Java Admin Client
    5. Access Control Lists
      1. Access Control Entries
      2. ACLs by Example
      3. Managing ACLs
    6. Realms
      1. LDAP Realm Module
      2. Other Realm Modules
    7. Hardening
      1. Reducing Collateral Damage
      2. Reducing the Attack Surface
    8. User Authentication in XQuery
      1. xmldb:authenticate
      2. xmldb:login
    9. Backups
  10. 9. Building Applications
    1. Overview
      1. Which Technology to Use?
      2. Application Aspects
      3. Getting Started, Quickly?
    2. Where to Store Your Application?
    3. URL Mapping Using URL Rewriting
      1. Anatomy of a URL Rewriting-Based Application
      2. How eXist Finds the Controller
      3. The URL Rewriting Controller’s Environment
      4. The Controller’s Output XML Format
      5. Advanced URL Control
    4. Changing the URL for URL Rewriting
      1. Changing Jetty Settings: Port Number and URL Prefix
      2. The controller-config.xml Configuration File
      3. Proxying eXist Behind a Web Server
    5. Requests, Sessions, and Responses
      1. The request Extension Module
      2. The session Extension Module
      3. The response Extension Module
    6. Application Security
    7. Running with Extra Permissions
    8. Global Error Pages
    9. Building Applications with RESTXQ
      1. Configuring RESTXQ
      2. RESTXQ Annotations
      3. RESTXQ XQuery Extension Functions
    10. Packaging
      1. Examples
      2. The Packaging Format
      3. The Prepare and Finish Scripts
      4. Creating Packages
      5. Additional Remarks About Packages
  11. 10. Other XML Technologies
    1. XSLT
      1. Embedding Stylesheets or Not
      2. Invoking XSLT with the Transform Extension Module
      3. Passing XSLT Parameters
      4. Invoking XSLT by Processing Instruction
      5. Stylesheet Details
    2. XInclude
      1. Including Documents
      2. Including Query Results
      3. Error Handling and Fallback
    3. Validation
      1. Implicit Validation
      2. Explicit Validation
    4. Collations
      1. Supported Collations
      2. Specifying Collations
    5. XSL-FO
    6. XForms
      1. XForms Instances
      2. XForms Submissions
      3. betterForm
      4. XSLTForms
  12. 11. Basic Indexing
    1. Indexing Example
    2. Index Types
      1. Structural Index
      2. Range Indexes
      3. NGram Indexes
      4. Full-Text Indexes
    3. Configuring Indexes
      1. Configuring Range Indexes
      2. Configuring NGram Indexes
    4. Maintaining Indexes
    5. Using Indexes
      1. Using the Structural Index
      2. Using the Range Indexes
      3. Using the NGram Indexes
      4. General Optimization Tips
    6. Debugging Indexes
      1. Checking Index Definitions
      2. Checking Index Usage
      3. Tracing the Optimizer
  13. 12. Text Indexing and Lookup
    1. Full-Text Index and KWIC Example
    2. Configuring Full-Text Indexes
      1. Configuring the Search Context
      2. Handling Mixed Content
    3. Maintaining the Full-Text Index
    4. Searching with the Full-Text Index
      1. Basic Search Operations
      2. Scoring Searches
      3. Locating Matches
    5. Using Keywords in Context
    6. Defining and Configuring the Lucene Analyzer
    7. Manual Full-Text Indexing
  14. 13. Integration
    1. Choosing an API
    2. Remote APIs
      1. WebDAV
      2. REST Server API
      3. XML-RPC API
      4. XML:DB Remote API
      5. RESTXQ
      6. XQJ
      7. Deprecated Remote APIs
      8. Remote API Libraries for Other Languages
    3. Local APIs
      1. XML:DB Local API
      2. Fluent API
  15. 14. Tools
    1. Java Admin Client
    2. eXide
    3. oXygen
      1. Connecting with oXygen Using WebDAV
      2. Natively Connecting with oXygen
    4. Ant and eXist
      1. Trying the Ant Examples
      2. Preparing an eXist Ant Build Script
      3. Using Ant with eXist
  16. 15. System Administration
    1. Logging
    2. JMX
    3. Memory and Cache Tuning
      1. Understanding Memory Use
      2. Cache Tuning
    4. Backup and Restore
      1. Client-Side Data Export Backup
      2. Server-Side Data Export Backup
      3. Restoring a Clean Database
      4. Emergency Export Tool
    5. Installing eXist as a Service
      1. Solaris
      2. Windows Linux and Other Unix
    6. Hosting and the Cloud
      1. Entic
      2. Amazon EC2
      3. Other Cloud Providers
    7. Getting Support
      1. Community Support
      2. Commercial Support
  17. 16. Advanced Topics
    1. XQuery Testing
    2. Versioning
      1. Historical Archiving
      2. Document Revisions
    3. Scheduled Jobs
      1. Scheduling Jobs
      2. XQuery Jobs
      3. Java Jobs
    4. Startup Triggers
      1. Configured Modules Example Startup Trigger
    5. Database Triggers
      1. XQuery Triggers
      2. Java Triggers
    6. Internal XQuery Library Modules
      1. Using the Hello World Module
      2. Types and Cardinality
      3. Function Parameters and Return Types
      4. Variable Declarations
      5. Module Configuration
    7. Developing eXist
      1. Building eXist from Source
      2. Debugging eXist
  18. A. XQuery Extension Modules
  19. B. REST Server Processes
    1. GET Process Flow
    2. HEAD Process Flow
    3. PUT Process Flow
    4. DELETE Process Flow
    5. POST Process Flow
    6. REST Server Parameters
      1. HTTP GET Parameters
      2. HTTP POST Parameters
      3. Common XML Grammars for Parameters
  20. Index