Part I. The XED scripting language

XED is a very small, very simple scripting language, based on XPath 1.0, allowing to modify in place an XHTML document.

The XED scripting language is used in XMLmind XML Editor to implement advanced macros and to implement the "Paste from Word" feature.

It is also used by XMLmind Word to XML (w2x for short) to translate to “semantic tags” the CSS styles and classes found in the XHTML document which is the result of the conversion of the input DOCX file. For example, it is used to convert numbered paragraphs (p elements styled using CSS counters) to proper lists (ol, li elements).

The initial context node of a XED script

A XED script modifies in place a single XHTML document. A XED script always has an XPath context node belonging to the document being modified. This initial context node is always the document itself ("/").