17.2 Using the Source Editor

The Source editor supports the following features:

Figure 17-1 XML Source Editor

The XML Source editor provides the following toolbar options:

Table 17-1 XML Editor Toolbar

Icon

Description

Expands all folding (if code folding is enabled). You can enable or disable code folding in two ways;

  • Selecting Windows > Preferences > General > Editors. Select Structured Editors. Select Enable Code Folding.

  • In the Source editor, right-click in the left ruler to access the Folding submenu.

Collapses all folding (if code folding is enabled)

Attaches a schema. For more information on using this feature, see Section 17.4, Attaching a Schema or DTD.

Shows help

The Source editor right-click menu contains these options:

Table 17-2 XML Source Editor Right-Click Menu Options

Menu Choice

Description

Revert File

Removes any changes to the XML file.

Cut, Copy, Paste, Undo, Save

Performs the common editor function.

Format

Document: Formats the entire document as specified in the preferences.

Active elements: Formats only selected elements.

Clear Validation Errors

Clears reported validation errors from the Problems view.

Validate

Validates the XML document and shows errors in the Problems view.

Preferences

This is the same as setting preferences by using the Windows > Preferences option. For more information, see Section 17.5, Setting XML Editor Preferences.

To save XML updates, do one of the following:

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 4.0.1 DTD Reference.

NOTE:You can disable notification of DTD errors in Designer Preferences. To do so, select Window > Preferences, then select Novell > Identity Manager > Configuration in the left navigation. Deselect Prompt for errors when validating XML against DTD for all Policy Editors.