Edit online

XML Schema Facets View (Available in Design Mode)

The Facets view for XML Schemas presents the facets for the selected component, if available. If the view is not displayed, it can be opened by selecting it from the Window > Show View menu.

Figure 1. Facets View

The default value of a facet is rendered in the Facets view with a blue color. The facets that can not be edited are rendered with a gray color. The grouping categories (for example: Enumerations and Patterns) are not editable. If these categories contain at least one child they are rendered with bold. Bold facets are facets with values set explicitly to them.

Important: Usually inherited facets are presented as default in the Facets view but if patterns are inherited from a base type and also specified in the current simple type only the current specified patterns will be presented. You can see the effective pattern value obtained by combining the inherited and the specified patterns as a tooltip on the Patterns category.

Facets for components that do not belong to the currently edited schema are read-only but if you double-click them you can choose to open the corresponding schema and edit them.

You can edit a facet by double-clicking it or by pressing Enter, when that facet is selected. For some facets you can choose valid values from a list or you can specify another value. If a facet has an invalid value or a warning, it will be highlighted in the table with the corresponding foreground color. By default, facets with errors are presented with red and the facets with warnings with yellow. You can customize the error colors from the Document Checking user preferences.

The Facets view provides the following actions in its toolbar and contextual menu:

Add
Allows you to add a new enumeration or a new pattern.
Remove
Allows you to remove the value of a facet.
Edit Annotations
Allows you to edit an annotation for the selected facet.
Move Up
Allows you to move up the current enumeration/pattern in Enumerations/Patterns category.
Move Down
Allows you to move down the current enumeration/pattern in Enumerations/Patterns category.
Copy
Copy the attribute value.
Open in Regular Expressions Builder
Rather than editing regular expressions manually, this action allows you to open the pattern in the XML Schema Regular Expressions Builder that guides you through the process of testing and constructing the pattern..

Facets can be fixed to prevent a derivation from modifying its value. To fix a facet value just click the Pin button.