Applying All Default Quick Fix Proposals

The Apply all default quick fix proposals tool can be used to apply quick fix proposals for all reported validation errors in one or more documents when one or more quick fix proposals have been detected for reported validation errors. If multiple quick fixes are available for the same validation error, the default quick fix defined in the Schematron validation schema using the sqf:default-fix attribute is automatically selected to be applied. If no default quick fix is explicitly specified, the first quick fix proposal in the list is considered. All quick fix proposals are then automatically executed in bulk, one after the other.
Important Notes to Consider:
  • To maintain the accuracy of the initially calculated error validation ranges, the quick fix proposals are applied in the reverse order of their selection.
  • If two or more quick fixes act on the same "area" within the document, only one is applied (no changes can be made to changes already made).
  • Quick fixes that involve "user-entered values" that normally present a dialog box to facilitate data entry will not be executed (the automatic process of applying all selected quick fixes cannot be interrupted by the presence of the respective dialog boxes).
The Apply all default quick fix proposals tool can be accessed from the following interface locations:

Invoking the tool opens the Apply all default quick fix proposals dialog box where you can choose the scope for the operation and optionally specify a filter to narrow the scope.

Figure 1. Apply All Default Quick Fix Proposals Dialog Box

The Scope section allows you to choose from the following scopes:

The Include files option in the Filters section can be used to narrow the scope of the operation by filtering the selected resources using a file pattern. For example, to restrict the operation to only parse and update XML documents from the selected files, you could use {*}.xml for the file pattern.

You can click the Preview button to see a comparison preview that provides an overview of the content changes that will be made, according to the quick fixes that will be applied. You can preview the changes in Text or Author mode. The comparison panel also informs you of any problems encountered. While previewing the changes, you can also choose to exclude certain files from having the quick fixes be applied if you do not agree with the changes for the particular files. If you agree with the changes presented, click Apply to trigger the quick fixes and update the content.

Troubleshooting: If a quick fix did not apply, a notification with some information about the error will be displayed in the Results view at the bottom of the application.
Tip: If the operation takes longer than expected, you can use the Stop button in the progress bar to cancel the operation.

Resources

For more information about the Apply all default quick fix proposals tool, see our video: Introducing the Apply All Default Quick Fix Proposals Tool.