
The , , and commands use the clipboard for storing information.
On Unix systems, this uses the CLIPBOARD selection while the currently selected document text is accessible by other programs on the PRIMARY selection.
On Windows, where only one clipboard exists, the system clipboard is used.
In both cases, the clipboard content is stored and retrieved as text. Cutting and pasting to and from other programs is possible as long as any text on the clipboard conforms to the XML/SGML syntax of the current document.
The command reverts the last editing operation.
epcEdit maintains a list of the last operations that were performed and allows undoing of these operations. The number of operations is configurable by setting the value of the Undo stack size option (see Preferences).
Invoking the command reverts the last action that was performed and removes the information about this action from the list of undoable operations. The next invocation of the command will then undo the next-to-last operation and remove it from the list.
The menu entry for the command is disabled if the list of undoable operations has become empty (either because a document has just been loaded or because all operations in the list have been undone).
The command deletes the currently selected region from the document and copies it to the clipboard.
The menu entry for the command is disabled if no region of text has been selected.
The command will fail without removing the selected region if the selection contains markup that is not properly balanced. For example, it is not possible to remove the start tag of an element without deleting the end tag, too.
The command copies the currently selected region from the document to the clipboard without removing it from the document.
The menu entry for the command is disabled if no region of text has been selected.
The command inserts the content of the clipboard at the location of the insertion cursor.
If the clipboard contains only text without any markup, the element into which the clipboard content is to be inserted must allow the occurrence of text at this location. If the clipboard contains markup such as element tags and entity references, the content of the clipboard must be well-formed and the element that contains the insertion cursor must allow the content of the clipboard to occur at this location.
The command allows you to search for text and/or markup in the current document.
When the command is invoked, epcEdit will display a dialog for searching:
The Search for field is for entering the search expression. The exact meaning of the search expression depends on the setting of the search type (see below).
The Replace with field can be used to enter a replacement text if the matches for a search should be replaced by some other text.
The Search within field can be used to restrict the search to certain elements. By default, all occurrences of the search expression will be considered a match. If the search is restricted to an element type, only occurrences of the search expression within elements of that type will be considered as matches.
The Include markup check box can be activated to extend the search to the markup in the document. If this box is unchecked (the default), the markup information of the document will be ignored when searching for an expression.
If the Include markup box is checked, markup information will be included in the search. For example, you could search for all occurrences of the attribute value bold of any attribute by entering a search expression like ="bold" and activating the Include markup box.
The three radio buttons to the left are used to specify how the search expression should be interpreted by epcEdit.
means that the search expression must exactly match and that upper and lower case is relevant.
is the default setting and tells epcEdit to search for the search expression in upper or lower case.
specifies that the search expression should be treated by epcEdit as a regular expression. Please refer to Regular expressions for details on regular expression search.
The three radio buttons to the right determine the direction in which to search.
tells epcEdit to search downward from the current location of the insertion cursor until the end of the document and to continue the search from the beginning of the document until the initial location has been reached again.
means that epcEdit should search for the search expression from the current location until the end of the document is reached.
tells epcEdit to search backward from the current location until the beginning of the document is reached.
The button to the right starts the search from the current location. The search will stop when the first match for the search expression has been found. Pressing the button again will continue searching after the current match.
The button replaces the current match with the replacement text. Note that you can not combine the Include markup setting with text replacement.
The button will replace all matches in the document with the replacement text, starting at the current location. If a search direction of Wrap has been specified, the replace operation will continue at the beginning of the document after the end of the document has been reached. The replace operation will stop at the end or at the beginning of the document if one of the other directions was selected.
In many cases, searching for a fixed expression is not sufficient. To provide advanced search capabilities, epcEdit supports the use of regular expressions in search terms.
A regular expression describes strings of characters. It's a pattern that matches certain strings and doesn't match others.
A regular expression consists of one or more alternative branches, separated by a vertical bar (|). A regular expression matches a string if one of it's branches matches the string. A branch is a concatenation of zero or more constraints or quantified atoms. The branch matches a string if the string matches the first element of the branch, followed by match for the second element, and so on. An empty branch matches the empty string.
An atom in a regular expression is one of the following:
(where re is any regular expression) matches a match for re, with the match noted for possible reporting.
as previous, but does no reporting (a ``non-capturing'' set of parentheses)
matches an empty string, noted for possible reporting
matches an empty string, without reporting
a bracket expression, matching any one of the chars (see BRACKET EXPRESSIONS for more detail)
matches any single character
(where k is a non-alphanumeric character) matches that character taken as an ordinary character, e.g. \\ matches a backslash character
where c is alphanumeric (possibly followed by other characters), an escape (AREs only), see ESCAPES below
when followed by a character other than a digit, matches the left-brace character `{'; when followed by a digit, it is the beginning of a bound (see above)
where x is a single character with no other significance, matches that character.
An atom can be followed by a single quantifier to form a quantified atom. Without a quantifier, an atom matches a match for that atom. With a quantifier, an atom may match several matches for that atom. The supported quantifiers are explained below.
a sequence of 0 or more matches of the atom
a sequence of 1 or more matches of the atom
a sequence of 0 or 1 matches of the atom
a sequence of exactly m matches of the atom
a sequence of m or more matches of the atom
a sequence of m through n (inclusive) matches of the atom; m may not exceed n
non-greedy quantifiers, which match the same possibilities, but prefer the smallest number rather than the largest number of matches (see MATCHING)
The forms using { and } are known as bounds. The numbers m and n are unsigned decimal integers with permissible values from 0 to 255 inclusive.
A constraint matches an empty string when specific conditions are met. A constraint may not be followed by a quantifier. The simple constraints are as follows; some more constraints are described later, under ESCAPES.
matches at the beginning of a line
matches at the end of a line
positive lookahead, matches at any point where a substring matching re begins
negative lookahead ,
epcEdit offers additional functionality for replacing the string that matches a regular expression. In the replacement string, you can refer to the matches of the sub-expressions in the regular expression by using a backslash-notation: \1 refers to the match for the the first parenthesized sub-expression of the regular expression, \2 refers to the second match, etc. \0 is the complete match for the regular expression.
The command lets you modify your preference settings for epcEdit.
When the Preferences command is invoked, epcEdit displays a dialog for modifying the preferences settings. The first tab of the preferences dialog (Figure 15-17) contains general settings that affect the appearance of epcEdit:
The Default text font field is used to specify the font that epcEdit should use to display the text of your documents in the absence of style sheet information. The font family and font size can be set from the combo boxes to the right and additional font options such as Bold, Italics, Underline, and Overstrike can be selected by the four buttons to the right of the combo boxes.
The Markup font field specifies the font to use inside the markup icons. It provides the same options as the Default text font field.
The text color and background color fields determine the colors that are used for displaying your document. The currently selected colors are shown in the buttons to the right. Clicking on these buttons brings up a simplified color selector (Figure 15-18) that contains a set of default colors. A new color can be chosen by clicking on the appropriate entry in this window. New colors can be added by selecting the palette entry at the lower right corner of the color selector to access the standard color dialog.
The Markup font color and Markup background color are used to specify the color of the text and the color of the background of the markup icons.
The Markup relief, Markup border width, and Markup padding fields can be used to adjust the three-dimensional appearance of the markup tags, the width of their border, and the additional space around the tags, respectively.
The Comment font and Comment text color are used to specify the appearance of text that occurs within comments in the document.
The second tab of the preferences dialog contains settings that determine the behavior of epcEdit.
The Cursor movement affects the way epcEdit reacts on the arrow keys. This setting can be adjusted to conform to the Windows or Unix conventions. On Windows systems, the default is the Windows setting; on Unix systems, the cursor movement defaults to Unix conventions. This options is primarily useful for users that use epcEdit on different platforms and like epcEdit to react the same on both platforms.
If the Track cursor in tree option is activated, the element containing the insertion cursor is automatically selected in the element tree. Activating this option can slow down epcEdit.
The Undo stack size determines the number of entries in epcEdit's internal undo list. Setting this option to a higher value will increase the number of operations that can be undone with the command, but will increase epcEdit's memory consumption and, if set to a very large number, may even slow down the editing process. Setting this value to 0 effectively disables the undo function and is only recommended if you want to use epcEdit as a script-controlled application in an automated environment.
Validate before save makes epcEdit validate your documents before actually saving them to a file. Setting this option affects the operation of the command as described in Save.
The Create Backup File option instructs epcEdit to create a backup file before saving a document. Backup files are named according to the conventions of the platform epcEdit is running on. On a Windows system, backup files will have an extension of .bak . On Unix systems, backup files will use the original filename extended by a tilde ~ character.
The Autosave period contains a time interval (in minutes) after which epcEdit will automatically save a document. Setting this value to 0 turns the autosave feature off.
The Apply linebreak settings option is used to control the handling of line breaks. If this option is set to Always, epcEdit will silently apply the line break settings that are defined in the document template. If the option is set to Yes, epcEdit will ask before applying these settings. If this option is set to Never, epcEdit will ignore the line break settings from the document template.
The Show startup dialog controls whether the startup dialog is shown when epcEdit is launched.
The third tab of the preferences dialog deals with directories and the help browser.
The Template directories list contains the directories that epcEdit will search for document templates. New entries can be created by pressing the button and selecting a directory from the directory browser. Existing entries can be modified or deleted by selecting the appropriate entry in the list and pressing the or buttons.
The Ask for template option controls how epcEdit reacts when it finds exactly one matching template while loading a document. If this option is set to Off, epcEdit will silently use the matching template. If this option is set to On, epcEdit will always ask before using a document template.
The Search path list contains the directories that epcEdit will search for additional document components like DTDs or entity sets. The list of directories is initialized from the environment variable SGML_SEARCH_PATH if this variable is set. New entries can be created by pressing the button and selecting a directory from the directory browser. Existing entries can be modified or deleted by selecting the appropriate entry in the list and pressing the or buttons.
The Help Browser entry is used to specify the program for showing the online help. On a Windows system, this field can be left blank to use the default web browser. On a Unix system, this value should specify the name of a web browser for viewing the help information.
The Document directory specifies the name of a directory that epcEdit will use as the default directory for storing documents. The value of this field determines the initial directory for the Open and Save As dialogs.
The Document directory is the default directory for storing documents.
The Catalogs tab of the preferences dialog contains information about catalog files.
The list shown in this tab contains the catalog files that epcEdit will use for resolving external identifiers. The file name of each catalog is shown in the left column. The right column states whether this catalog will be used for XML documents, for SGML documents, or for both types of documents.
New catalogs can be added by pressing the button and existing catalog information can be modified by clicking on the button after selecting an entry in the list. Both buttons display a file selection dialog for choosing a catalog file.
A catalog file can be permanently deleted from the list of catalogs by pressing the button.
After selecting a list entry and pressing the button, a new dialog is displayed.
The dialog shown in Figure 15-22 is used to specify whether a catalog file should be used for XML documents, for SGML documents, or for both types of documents. A disabled catalog will remain in the list of catalog files, but it will not be used.
Tip: Modifying the settings in the Catalogs apply only to epcEdit's catalog handling routines; epcEdit will never modify the catalog files themselves.
The Parser tab of the preferences dialog contains settings for epcEdit's built-in XML/SGML parser.
The settings shown in Figure 15-23 affect document validation and the loading of documents.
The Maximum parser messages value delimits the number of error messages and warnings that epcEdit will display when loading or validating a document. Setting this value to 0 will cause epcEdit to show all messages.
The Show parser warnings tells epcEdit to show warning messages if set to On. Warnings will be suppressed if this option is set to Off.
Expand text entities controls whether text entities should be expanded when a document is loaded. If this option is set to Off, text entities will be shown as entity references only. If set to On, text entities will be expanded and their content will appear inside the document that references the entity. Please refer to Entities for more details on text entities.
The Imply Default Attributes option controls whether unspecified attributes that have a default value will automatically be added to an element with their default value.
Imply fixed Attributes controls whether attributes with fixed values will automatically be added to elements if they are not specified.
The Keep ignorable Whitespace option controls whether the parser will discard ignorable whitespace in your document or not. Ignorable whitespace occurs between markup where it is not considered to be part of the document text. Some XML tools will add tabs, spaces, or line feeds between elements to provide a visible indentation for XML elements.
Technically, this whitespace is not considered to be part of the document content and will be ignored by many XML processing tools. If you want to retain this whitespace in your document, you can set the Keep ignorable Whitespace option to On. If you want epcEdit to discard this information, you can set this option to Off.
The Use lower case option determines how epcEdit normalizes element, attribute, and entity names when loading an SGML document. When the SGML declaration specifies a NAMCASE value of YES for general names or entity names, these names will be converted to upper case unless this option is set to Yes. The setting of this option does not affect XML documents where all names are case sensitive.
The rules settings that can be adjusted in this dialog control what kind of checks epcEdit will perform before it allows an operation. Setting a value to Off means that epcEdit will be more liberal in allowing the operation in question; setting a value to On will cause epcEdit to perform additional checks before allowing the operation.
Activating strict rules checking can slow epcEdit down if you are editing very long documents with a complex DTD.