Altova XMLSpy 2024 Enterprise Edition

Global components are added as children of the top level xs:schema element. Add a global component by clicking the Append icon or Insert icon at the top left of the upper pane (see list of icons further below), and then selecting, from the global components menu (screenshots below), the global component you want to add.

 

The screenshots below show the global components that can be added: XSD 1.1 mode on the left, XSD 1.0 mode on the right. (Override and Default Open Content are XSD 1.1 features.)

SchViewAddGlobalCompXSD11     SchViewAddGlobalCompXSD10

You can add as many global components as you like. All the global components in the schema are displayed in a tabular list in Schema Overview (screenshot below).

SchemaOverview02

 

Editing in Schema Overview

Note the following editing features of Schema Overview:

 

You can reposition components in the Schema Overview list using drag-and-drop.

You can navigate using the arrow keys and Tab key of your keyboard.

You can use cut/copy-and-paste to copy or move global components, attributes, assertions, and identity constraints from one diagram to a different position in the diagram, to other diagrams, and from one schema to another.

Right-clicking a component opens a context menu that allows you to cut, copy, paste, delete, or edit the annotation data of that component.

To enter a new line in global comments and global annotations, press Ctrl+Enter. To enter a tab, press Ctrl+Tab.

 

Schema Overview and related icons

 

ic_schem_app

Append Global Component: Adds global components to the bottom of the global components list. If the component must, by definition, occur at the beginning of the document, it is added to the top of the list.

ic_schem_ins

Insert Global Component: Adds global components above the selected component. If the component must, by definition, occur at the beginning of the document, it is added to the top of the list.

Sort

Sort: Pops up the Sort Components dialog, in which the precedence of sort criteria can be set (name before kind, or vice versa), before going ahead with the sorting. See description below.

ic_CommentLines

Comments: Pops up a menu to select between multi-line and single-line display of global comments. See description below.  

SViewIconShowContentModel

Switch to Content Model View: Available for global components that have a content model. Opens the global component's content model in Content Model View.

ic_back2global

Show Globals: Available in Content Model View. Switches to Schema Overview.

 

Switching between Schema Overview and Content Model View

Some global components (such as complex types, element declarations, and model groups) have a Switch to Content Model View icon to the left of the component name (see list of icons above). This indicates that these global components can have a content model which describes the component's structure and contents.

 

Clicking this icon switches the view from Schema Overview to the Content Model View of that global component. Other global components (such as annotations, simple types, and attribute groups) do not have a content model, and therefore do not have the Switch to Content Model View icon. You can switch back to Schema Overview from Content Model View by clicking the Show Globals icon  (see list of icons above).

 

Sorting global components

You can sort global components by clicking the Sort icon in the Schema Overview toolbar (see list of icons above). In the Sort Components dialog that pops up (screenshot below), you can choose to sort either all sortable global components, or the set of selected components. You can use Shift+click to select a range and Ctrl+click to add additional components to the selection.

 

Note:Global components that must occur at the start of the document (such as include and import) are not affected by the sorting feature. They are not part of the range of global components that may be sorted.
GlobalsSortComponents

After setting the range you can choose to sort the sortable range alphabetically (Name before kind), or organized first by kind and then by name.

 

The sort order is implemented in the text of the schema.

 

Global comments: line display mode

Global comments can be displayed in a multi-line text field (default) or a single-line text field (see screenshots below).

SchOviewMultilineComment
SchOviewSingleLineComment

To switch between these two display modes of comments, click the Comments icon at the top of the Schema Overview pane and select the option you want. Within the text of a comment, if you wish to create a new line (and so make the comment a multi-line comment), press Ctrl+Enter. When comments are in single-line text-field display mode, placing the cursor over a multi-line comment pops up a multi-line box that displays all the lines.

 

© 2017-2023 Altova GmbH