Creating queries

A query is a path in the data source schema that is attached to a template element. A template specifies the data to be extracted using queries.

The query path starts with the root element (module), continues with its child element (Object), the with the child attribute of the object, and so on. For example: Module/Object/Attribute/Name.

The following table shows some commonly used queries:
Query Description
module Returns a single result, the source module.
module/object Returns all of the objects in the source module, as filtered or sorted by a data source view.
module/object/attribute If used in a module/object context returns all of the attributes for the current object. If not used in this context, returns all of the objects in the source module.
A query is attached to a template element. The template element and its children can use the attributes of the entities returned by the current query as well as the attributes of the queries from parent elements. In the following example, after the query module/object is applied, any of the schema element attributes for the object can be used, such as Absolute Number, Has inlink, or Object Text.
Template elements can be nested. Setting queries on elements and their children elements creates nested contexts. The query in the child element is performed on the results of the parent query.
	Element 1: module/object
	Element 1.1 (child of Element 1): module/object/attribute

In Element 1, only the attributes of IBM® Rational® DOORS® objects can be used. In Element 1.1, the attributes of Rational DOORS object attribute names can be used. The second query yields a list of attributes for the current object returned by the query of Element 1.


Feedback