6.6.3 Structure of a Query

A query, whether XPath or SQL, specifies a subset of nodes within a workspace, called the result set. The result set constitutes all the nodes in the workspace that meet the constraints stated in the query. The constraints fall into three categories:

A query result is returned in two parallel forms: an iterator over the result set of nodes and a table where each row corresponds to a node in the result set. The query statement also defines aspects of how these two return objects are structured through two presentation specifiers:

The following sections describe in more detail how each of these five elements are expressed, both in XPath and in SQL, and how these affect the content and presentation of the query result.