Edit online

XML Schema Regular Expressions Builder Tool

The XML Schema regular expressions builder allows you to test regular expressions on a fragment of text as they are applied to an XML instance document. Start the tool by selecting XML Schema Regular Expressions Builder from the XML Tools menu.

Figure 1. XML Schema Regular Expressions Builder Dialog Box
The dialog box contains the following:
Regular expressions editor
Allows you to edit the regular expression to be tested and used. Content completion is available and presents a list with all the predefined expressions. It is triggered by pressing Ctrl + Space (Command + Space on OS X).
Error display area
If the edited regular expression is incorrect, an error message will be displayed here. The message contains the description and the exact location of the error. Also, clicking the quick navigation button () highlights the error inside the regular expression.
You can choose from several categories of predefined expressions. The selected category influences the displayed expressions in the Available expressions table.
Available expressions
This table includes the available regular expressions and a short description for each of them. The set of expressions depends on the category selected in the previous Category combo box. You can add an expression in the Regular expressions editor by double-clicking the expression row in the table. You will notice that in the case of Character categories and Block names, the expressions are also listed in complementary format.
Evaluate expression on
You can choose between two options:
  • Evaluate expression on each line - The edited expression will be applied on each line in the Test area.
  • Evaluate expression on all text - The edited expression will be applied on the whole text.
A text editor that allows you to enter a text sample that will have the regular expression applied. All matches of the edited regular expression will be highlighted.

After editing and testing your regular expression you can insert it in the current editor. The Insert button will become active when an editor is opened in the background and there is an expression in the Regular expressions editor.

The regular expression builder cannot be used to insert regular expressions in the Grid mode or schema Design mode. Accordingly, the Insert button will be not available if the current document is edited in these modes.

Note: Some regular expressions may indefinitely block the Java Regular Expressions engine. If the execution of the regular expression does not end in about five seconds, the application displays a dialog box that allows you to interrupt the operation.