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 (Query1),
continues with its child element (Query2), the
with the child attribute of the object, and so on. For example: Query1/Query2/Query3/Query4.
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 Query1/Query2 is
applied, any of the schema element attributes for the object can be
used.
Nested queries
Template elements are often
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.
In the parent container element,
only the attributes of Query1/Query2 can be used.
In the child container element, the attributes of the Query1/Query2/Query3 query
can be used. The second query yields a list of attributes for the
current object returned by the query of the parent container.
Copying queries
You can copy and paste elements
that have queries from within the same template or from another open
template.
- If the element contains queries or attributes from a data source
schema that is not yet being used in the template, the Resolve
conflicts window opens to add the data source schema to
the Data Source Schemas view.
- If the element contains master pages or styles that are not yet
being used in the template, the Resolve conflicts window
opens to add the master pages or styles to the Outline view of the
current template.
- If both templates have a data source schema with the same name,
but the schema content is different, the Resolve conflicts window
opens where you can change the name of the data source schema.
Note: When you copy queries that have custom attributes
with variables in them, verify the pasted results. Custom attributes
and the variables they use might not be copied over correctly, so
you must fix the custom attributes and add the variables again, if
necessary.