![]() |
| Previous Top Next |
Schema Tree |
The Schema Tree sidebar (screenshot below) enables you to do the following:
| • | Select multiple root elements (document elements) for a schema. |
| • | Drag nodes (elements, attributes, global types) from a schema tree and drop them into the design. These nodes represent the XML content that is to be included in the output. |
| • | View listings of all global elements and types in all schema sources. Enables a global element or global type to be created as a global template. |
| • | View a listing of all namespaces used in the SPS. |

Root elements
For each schema, under the $XML heading, the selected Root elements (or document elements) are listed. This list consists of all the root elements you select for the schema (see below for how to do this). Each root element can be expanded to show its content model tree. It is from the nodes in these root element trees that the content of the main template is created. Note that the entry point of the main template is the document node of the main schema, which you can select or change at any time (see below for how to do this).
To select the root elements for a schema, do the following: Click the Select
button at the right of the Root Elements item. This pops up the Select Root Elements dialog (screenshot below), in which you can select which of the global elements in the schema is/are to be the root elements. See SPS Structure | Schema Sources for an explanation of the possibilities offered by a selection of multiple root elements.

Additionally, all the global elements in all added schemas are listed under the All Global Elements item. For each global element, a global template can be created.
Global elements and global types
Global elements and global types can be used to create global templates which can be re-used in other templates. Additionally, global types can also be used directly in templates.
Namespaces
The namespaces used in the SPS are listed under the Namespaces heading together with their prefixes. Referring to such a list can be very useful when writing XPath expressions. Additionally, you can set an XPath default namespace for the entire SPS by double-clicking the value field of the xpath-default-ns entry and then entering the namespace.
Toolbar and schema tree icons
The following toolbar icons are shortcuts for common Schema Tree sidebar commands.
|
In a user-defined schema, adds a child element to the document element or appends a sibling element to the selected element. More commands for building a user-defined schema are available by clicking the dropdown arrow of the icon. |
|
Make/Remove Global Template, enabled when a global element or global type is selected. |
|
Remove the selected item. |
|
Synchronize tree toggle. When toggled on (icon has border), selecting a node in the tree selects (i) the corresponding node in the design, and (ii) the corresponding node in the Design Tree if the Synchronize Tree icon in the Design Tree window is toggled on. When toggled off, the corresponding node in the design is not selected. Switch the toggle off if dragging a node from the tree and dropping it to the desired location in the design proves difficult. |
|
When toggled on, the expanded items auto-collapse. |
Symbols used in schema trees
Given below is a list of the symbols in schema trees.
| Element. |
| Attribute. |
| Element with child elements. Double-clicking the element or the +/- symbol to its left causes the element to expand/collapse. |
| DB Filter applied. Applies only to top-level data table elements in the schema tree. |
| Global types can be either complex or simple. Complex types are indicated with a cyan icon, simple types with a brown icon. |
See also:
Creating the SPS Structure | Schema Sources, for more information on schema selection and root elements.
|