Vex User Guide | ||
---|---|---|
![]() |
||
Updating This Document |
Vex is a V' isual '''E'ditor for 'X'ML that hides the raw XML tags from the user, providing instead a '''word processor like interface. Vex uses standard DTD files to define document types and CSS stylesheets to define document layout. Vex contains definitions for DocBook and DITA. To edit other XML formats only a DTD and a CSS are needed.
After installing one of the Eclipse Indigo or later packages, the easiest way to install Vex is via the Eclipse Marketplace by performing the following steps:
The Vex installer adds the following items to your Eclipse installation.
The Vex installer also makes the Visual XML editor the default editor for xml files. If you would like to change this preference see the General - Editors - File Associations section of the Eclipse Preferences tool.
After installation, you are ready to create and edit an XML document using the Vex tools. You are not required to use the Vex tools to create the initial XML document but the Vex tools may help you get started. After creating a project to contain your XML document, perform the following step:
Vex supports the following Document Types out of the box.
After creating the document you are ready to add elements and content.
You navigate between and within document elements using the mouse and the arrow keys on your keyboard. As you navigate the document, the Eclipse status bar displays your current location within the document and the cursor orientation gives you clue as to what you can do at the current location. A vertical cursor indicates that you can type content into the element while a horizontal cursor indicates that Vex is expecting you to insert new element.
Navigation Tip
Vex provides several commands to edit a XML document.
Editing Tip
To insert a new element at the current cursor position or - in the case if something is selected - to surround the selected text or fragment with a new element:
Tip: To place the cursor at the proper position (e.g. a new chapter between two existing chapters in DocBook) see the path which is shown in the status bar.
This command duplicates the currently selected elements and inserts them at the beginning of the current selection. If there is nothing selected, 'Duplicate Selection' duplicates the element that surrounds the current cursor position.
The document's root element can, of course, not be duplicated.
This command allows you to change the surrounding element of the current selection. A popup dialog shows a list of all elements that could replace the element. An element A'' can be replaced by another element ''B, if B'' can contain all the content of ''A and B'' is allowed at ''A's position in the document structure. If you select one of the list items, the popup dialog is closed and the element, which surrounds the current selection is replaced by the selected element.
This command removes the element that surrounds the current selection:
<emph>The element's content<emph/>
will result in
The element's content
The main purpose of this command is to remove inline elements from text. If you use 'Remove Tag' to remove structural elements (e.g. <para> or <section>), the content of the element might also be removed. The current implementation does not handle this case properly. This might change in the future.
The Remove Tag command can also be used to remove comment tags from a comment to "uncomment" text.
The option Scope is inoperable.
A Vex Plug-in Project contains information about a custom document type accompanied with (at least one) style definition. This is one way to make a custom document type usable in Vex.
The Vex Plug-in consist of a file named vex-plugin.xml, which contains the configuration, plus all files needed for the document type definition (DTD) and style (CSS).
The following steps describe how the creation of such a Vex Plug-in Project works currently:
The style can be selected in the Document menu or in the context menu of the Vex editor.
The file vex-plugin.xml can also be edited directly.
Pattern | Meaning | See W3C |
---|---|---|
* | Matches any element | Universal selector |
E | Matches any E element (i.e., an element of type E) | Type selectors |
E F | Matches any F element that is a descendant of an E element | Descendant selectors |
E > F | Matches any F element that is a child of an element E | Child selectors |
E + F | Matches any F element immediately preceded by a sibling element E (this rule is applied when saving instead of when editing the document) | Adjacent selectors |
E foo | Matches any E element with the "foo" attribute set (whatever the value) | Attribute selectors |
E foo="warning" | Matches any E element whose "foo" attribute value is exactly equal to "warning" | Attribute selectors |
E foo~="warning" | Matches any E element whose "foo" attribute value is a list of space-separated values, one of which is exactly equal to "warning" | Attribute selectors |
Not (yet) supported: E:first-child (see The :first-child pseudo-class), E ="en" (see Attribute selectors), E#myid (see ID selectors), and CSS3 rules (e.g. E foo^=bar or E ~ F)
![]() |
||
Updating This Document |