Database Reference
In-Depth Information
CHAPTER 3
Using eXist 101
This chapter contains an introduction to actually using eXist to build software. It will
take you by the hand and guide you step by step along the winding XPath roads,
through the XQuery meadows, along some RESTful paths, over the index mountain,
and to many, many other wonderful places—all in a quest for the golden ring of an
understanding that binds it all (which will definitely not be thrown into some vol‐
cano by Gollum).
This chapter guides you through building a simple web application that uses, ana‐
lyzes, and enables searching of some Shakespeare plays. We start at the very begin‐
ning (creating the application's collections, adding data), and end with a simple but
usable piece of software. Along the way, we will tell you where to find more informa‐
tion about the subjects covered. Everything is done natively through eXist; no exter‐
nal IDE is required.
To make ourselves clear: the goal of this chapter is not to teach you XQuery. We
assume you have at least a basic understanding of this language, including some
experience with XPath. However, we do try to explain what we're doing with some of
the XQuery, so if you don't know any XQuery yet, do not despair!
Preparations and Basic Application Setup
The application we're going to build needs a set of data to work with. eXist comes
with an example application (one of the eXist-db demo apps, available through the
dashboard) that contains a nice, consistent, and large enough set of example data to
be useful for us. So we're going to reuse this and, in doing so, show you how to export
and import files.
The tools provided alongside eXist for working with the database's content (see “The
Dashboard” on page 24 ) have the ability to copy content from one database collection
 
Search WWH ::




Custom Search