The following sample X-Query window contains all information that is required to execute a query: server, database, collection and query expression.
The X-Query window contains several panes. To modify the size of a pane, move the mouse pointer over the border separating the panes until the pointer changes, showing two arrows pointing in opposite directions. Then drag the border using the mouse until the panes have the desired size.
The following topics are covered below.
The following menus are available:
Menu | Using the commands in this menu, you can ... |
---|---|
File | Create, open, execute and save your queries. |
Edit | Cut, copy and paste information. |
View | Switch on and off different elements of the X-Query window. |
Result | Manage your results. |
Tools | Use additional related features. |
Help |
Invoke online help. |
For reference information on each menu command, see Menu Commands in an X-Query Window.
You can execute the most important functions using the toolbar.
The following toolbar buttons are available:
To switch the toolbar display on and off
From the
menu, choose .When the toolbar is displayed in the X-Query window, a check mark is shown next to this menu command.
The query area consists of the text boxes in which you enter the required server, database and collection, and a query editor in which you enter your query.
When you invoke an X-Query window, the currently selected object in the navigation tree is automatically shown as a query expression. Server, database and collection containing the selected object are automatically provided in the text boxes. This if helpful if you do not want to type this information yourself. In addition, any settings used for the instance descriptors are included in the query. For example:
You can now modify the query expression and/or execute the query. See Working with X-Queries.
A query is specified using Tamino's X-Query language. See X-Query User Guide and X-Query Reference Guide in the Tamino XML Server documentation for detailed information.
Using the Tamino connect/select dialog, we can select the server and database. These buttons are available along with the text areas.
Different colors are used for a query expression. Blue is used for
keywords of the X-Query language such as and
, true
,
sortby
or between
. Red is used for values of
datatypes such as string
or boolean
.
To execute the query
Choose
.Or:
Choose from the menu
bar.
After you have executed a query (see Executing an X-Query), its result is shown on the Result pane at the bottom of the X-Query window. For example:
The following topics are covered below:
More information is provided in the section Managing X-Query Results.
The left side of the Result pane shows a navigation tree with the query result. The number of result packs shown depends on the defined result fetch options. See Specifying the Result Fetch Options.
Depending on your query expression, different types of query result are provided. Each result shows either instances or fragments:
Instances
Complete instances are shown when you search for a doctype, for
example, when your query expression is "/patient".
When an instance descriptor has been defined for the XML instances, it is
applied.
Fragments
A fragment is a small part of an instance. It is shown when you
specify, for example, "//name/firstname" which shows
all first names not considering their locations in the XML object (i.e. this
can be the first name of a patient or doctor). The ino:id
is
always shown for a fragment; an instance descriptor is not applied. Fragments
are not shown for non-XML instances.
The following icons may appear in the navigation tree. The icon tells you which type of query has been executed.
Shown as the result of an XML query: XML instance or non-XML instance. | |
Shown as the result of a non-XML query: XML instance or non-XML instance. | |
Shown as the result of an XML query: fragment of an XML instance. |
Arrows for browsing the instances may appear in the tree:
Click the plus sign next to this symbol to fetch and display the next pack. When using the keyboard, select this symbol and press ENTER. | |
Click the plus sign next to this symbol to fetch and display the previous pack. When using the keyboard, select this symbol and press ENTER. |
To switch the navigation tree display on and off
From the
menu, choose .Or:
Choose the following toolbar button:
When the navigation tree is displayed in the Result pane, a check mark is shown next to the command .
The right side of the Result pane shows the contents of the result that is currently selected in the navigation tree on the left.
Depending on the type of object and the type of query, one or more views are available. When different views are available, they can be activated using the following buttons in the top right corner of the Result pane:
Button | Keyboard | Description |
---|---|---|
CTRL+SHIFT+T | Tree view for the result of an XML query. Not available for the result of a non-XML query. Whether lines are wrapped in tree view depends on the corresponding setting in the Options dialog box. See Setting the Tamino X-Plorer and X-Query Options for further information. | |
CTRL+SHIFT+P | Plain view providing the content of a result. | |
CTRL+SHIFT+I | Image view for non-XML objects (for example, GIF). Not available for the result of an XML query. |
Note:
In plain view, you can copy information using the corresponding
command from the menu.
The following example shows the contents of an XML instance in tree view (XML query):
The following example shows the contents of the same instance in plain view (XML query):