Stock XED scripts

XMLmind Word to XML comes with two stock “main” XED scripts:


Invokes XED scripts used to “polish up” the styled XHTML 1.0 Transitional document created by the Convert step (e.g. process consecutive paragraphs having identical borders).


Invokes XED scripts used to prepare the generation of semantic XML of all kinds: XHTML, DocBook, DITA. These scripts leverage the CSS styles and classes found in the styled XHTML 1.0 Transitional document created by the Convert step. They translate these CSS styles and classes (e.g. numbered paragraph) into semantic tags (e.g. ol/li).

Both the above “main” XED scripts are organized as sequences of simpler, short, XED scripts. Using –p or –pu options, these short scripts may be replaced or removed and may be passed parameters. It’s also possible to insert custom scripts before or after any of these short scripts.

Excerpts from w2x_install_dir/xed/main-styled.xed:

script(defined("before.init-styles", ""));

script(defined("do.init-styles", "init-styles.xed"));

script(defined("after.init-styles", ""));

script(defined("before.title-styled", ""));

script(defined("do.title-styled", "title-styled.xed"));

script(defined("after.title-styled", ""));

script(defined("before.remove-pis", ""));

script(defined("do.remove-pis", "remove-pis.xed"));

script(defined("after.remove-pis", ""));

script(defined("before.expand-tabs", ""));

script(defined("do.expand-tabs", "expand-tabs.xed"));

script(defined("after.expand-tabs", ""));

script(defined("before.borders", ""));

script(defined("do.borders", "borders.xed"));

script(defined("after.borders", ""));

script(defined("before.number-footnotes", ""));

script(defined("do.number-footnotes", "number-footnotes.xed"));

script(defined("after.number-footnotes", ""));

script(defined("before.finish-styles", ""));

script(defined("do.finish-styles", "finish-styles.xed"));

script(defined("after.finish-styles", ""));


Remove script title-styled.xed:

-p do.title-styled “”

Replace script borders.xed by custom script “C:\Users\john\w2x tests\MyBorders.xed”:

-pu do.borders “C:\Users\john\w2 tests\MyBorders.xed”

Pass parameter finish-styles.css-uri to script finish-styles.xed:

-p edit.finish-styles.css-uri css/manual.css

By convention (this is not strictly required), the name of a parameter which applies to a given XED script is prefixed with the basename without any file extension of this script. Hence the full names of most parameters of Edit steps have the following syntax: step_name.script_name.parameter_name. Examples:

-p edit.prune.preserve “p-ProgramListing”

-p edit.inlines.convert “c-Code code”

Execute script customize\patch_manual.xed before script finish-styles.xed:

-pu edit.before.finish-styles customize\patch_manual.xed

Execute script customize\patch_manual.xed after script borders.xed:

-pu edit.after.borders customize\patch_manual.xed