The Source editor supports the following features:
Syntax highlighting.
Context-sensitive code completion based on DTD and XML schema.
The code completion is based on the existing content of the XML document if no DTD or XML schema is associated with the XML document. When code completion is activated and the XML document contains <root><a><b/></a><a></a></root>, then type the second <a>, the editor suggests that you add b as a child of the a element.
As-you-type validation. If the XML is invalid (for example, the > is removed from a tag), the editor indicates the error.
General text editing operations such as undo, redo, cut, copy, paste, select all.
Figure 16-1 XML Source Editor
The XML Editor provides the following toolbar options:
Table 16-1 XML Editor Toolbar
Button |
Description |
---|---|
Expands all foldings (if code folding is enabled). You can enable or disable code folding in two ways;
|
|
Collapses all folding (if code folding is enabled) |
|
Attaches a schema. For more information on using this feature, see Section 16.4, Attaching a Schema or DTD. |
|
Shows help |
The Source editor right-click menu contains these options:
Table 16-2 XML Editor Source Editor Right-Click Menu Options
Menu Choice |
Description |
---|---|
|
|
|
Performs the common editor function. |
|
Document: Formats the entire document as specified in the preferences. Active elements: Formats only selected elements. |
|
Clears reported validation errors from the Problems view. |
|
Validates the XML document and shows errors in the Problems view. |
|
This is the same as setting preferences by using the Section 16.5, Setting XML Editor Preferences. option. For more information, see |
To save XML updates, do one of the following:
Click
in the Designer toolbar.Right-click in the XML Editor, then select
.Press Ctrl+S.
When saving, the XML Editor automatically checks the XML to make sure it conforms to the appropriate DTD (Filter DTD, DirXML Script DTD, etc.) It saves non-conforming XML only if you explicitly instruct it to do so. For information about Identity Manager DTDs, see the Identity Manager 3.6 DTD Reference Guide.
NOTE:You can disable notification of DTD errors in Designer Preferences. To do so, select
> , then select > > in the left-side navigation. Uncheck .