Edit in place input XHTML document using a XED script. The result of this step is the same XHTML document, but modified by the script.
For clarity, the “edit.
” parameter name prefix is omitted here.
However when you’ll pass any of the following parameters to w2x
, please do not forget this prefix. Example: -p edit.ids.generate-section-ids yes
.
Parameters:
Name | Value | Description |
| An absolute URL or the path of an existing file. No default (required). | Specifies which XED script should be used to edit the input XHTML document. A relative file path is relative to the current working directory. |
Any other parameter is passed to the XED script as a XED global variable.
XMLmind Word to XML (w2x for short) comes with two stock “main” XED scripts:
w2x:xed/main-styled.xed
w2x:xed/main.xed
ol
/li
).Something like “w2x:xed/main.xed
” is an absolute URL supported by w2x. “w2x:
” is an URL prefix (defined in the automatic XML catalog used by w2x) which specifies the location of the parent directory of both the xed/
and xslt/
subdirectories.
Name | Value | Description |
| An absolute or relative “ Default: “”. “Interned” CSS styles, if any, are stored in a | Global variable defined in Store “interned” CSS styles, if any, in the CSS (UTF-8 encoded) file having this URI. A relative URI is relative to the URI specified by parameter xhtml-file. More information about “interned” CSS styles in command parse-styles (command invoked by |
| An absolute URL or a filename. A relative filename is relative to the current working directory. Default: “” (no custom styles). | Global variable defined in Specifies the location of a CSS file. The custom CSS styles found in specified file are simply appended to the automatically generated CSS styles. Using this variable is the easiest way to customize the automatically generated CSS styles. When generating multi-page styled or semantic XHTML of any kind (frameset, Web Help, EPUB) Please use No need to specify |
| “ Default: “ | Global variable defined in Very few web browsers (Firefox) can natively render MathML. Fortunately, there is MathJax. MathJax is a JavaScript display engine for mathematics that works in all browsers.
|
| String. Default value: the URL pointing to the MathJax CDN, as recommended in the MathJax documentation. | Global variable defined in The URL allowing to load the MathJax engine configured for rendering MathML. Ignored unless parameter |
| “ Default: “ | Global variable defined in Default value “ This simple behavior makes these titles invisible to the user, though usable by programs such as the XSLT stylesheets generating DITA or DocBook. Value “ These equivalent, visible, XHTML elements are specified by parameters title.title-container and title.subtitle-container. |
| An XHTML element name possibly followed by one or more attributes. Default: “” when generating styled XHTML; otherwise “ | Global variable defined in Specifies the XHTML element to which a paragraph having a “ Ignored when parameter title.keep-title is “ |
| List of user-defined style names separated by space characters. Default: “” (empty list). | Global variable defined in Specifies which user-defined paragraph styles should be considered to be equivalent to standard style “ (Paragraph styles, whether user-defined or standard, are given a “ |
| An XHTML element name possibly followed by one or more attributes. Default: “” when generating styled XHTML; otherwise “ | Global variable defined in Specifies the XHTML element to which a paragraph having a “ Ignored when parameter title.keep-title is “ |
| List of user-defined style names separated by space characters. Default: “” (empty list). | Global variable defined in Specifies which user-defined paragraph styles should be considered to be equivalent to standard style “ (Paragraph styles, whether user-defined or standard, are given a “ |
Name | Value | Description |
| One or more processing-instructions targets separated by space characters. Default: “” (remove all processing-instructions) | Global variable defined in Specifies which processing-instructions should be kept in the styled HTML document. By default, all processing-instructions are removed from the styled HTML document. Such processing-instructions are useful only when the styled HTML document created by the Convert step is used as an intermediate format in order to generate semantic XML. |
Name | Value | Description |
| “ Default: “ | Global variable defined in If “ If “ The “ |
| List of user-defined style names separated by space characters. Default: “” (empty list). | Global variable defined in Specifies which user-defined paragraph styles should be considered to be equivalent to standard style “ (Paragraph styles, whether user-defined or standard, are given a “ |
| A conversion specification. Default: “”. No conversions other than those performed by | Global variable defined in Specified paragraph styles are converted to specified XHTML elements. See below. |
| A conversion specification. Default: “”. | Global variable defined in Specified paragraph styles are converted to specified XHTML elements. See below. When using MS-Word, there two ways to represent code samples:
A sequence of –p edit.blocks.convert "p-Code1 span g:id='pre' g:container='pre'" A –p edit.blocks.convert-to-pre "p-Code2 pre" |
| List of user-defined style names separated by space characters. Default: “” (empty list). | Global variable defined in Specifies which user-defined paragraph styles should be considered to be equivalent to standard style “ (Paragraph styles, whether user-defined or standard, are given a “ |
| “ Default: “ | Global variable defined in If set to “ This option is turned off by default because, in the general case, it's not possible to emulate tab stops using tables. |
| “ Default: “ | Global variable defined in If set to “ |
| A conversion specification. Default: “”. No conversions other than those performed by | Global variable defined in Specified paragraph styles are converted to specified XHTML heading elements ( Note that by default, script |
| “ Default: “ | Global variable defined in Ensure that all the sections found in the semantic XHTML resulting from the conversion of a DOCX file have a unique ID. When this ID is missing, it is computed using the content of the <div class="role-section2" id="Title_of_this_section"> <h2>Title of this section</h2> ... Setting |
| An integer greater or equal to 1. Default: 32. | Global variable defined in Specifies the maximum length of the automatically computed ID when parameter |
| A string. Default: " | Global variable defined in Specifies the string used to join index terms when a redirection to another index entry is to be generated (example: “See Cat, Siamese, Seal point”). |
| An element name optionally followed by attributes. Defaults: | Global variables defined in By default, the Edit step converts a text Similarly, alternate element names may be specified using the following parameters: Example 1: generate Example 2: do not generate This facility is useful only when generating semantic XHTML and all formats based on semantic XHTML. Using it when generating DITA or DocBook may give poor results. |
| A conversion specification. Default: “”. No conversions other than those performed by | Global variable defined in Specified character styles are converted to specified XHTML elements . See below. |
| “ Default: “ | Global variable defined in Specifies whether spans having a bigger (respectively smaller) font size than their parent elements should be converted to |
| Regular expression matching part or all of the name of the XHTML | Global variable defined in When generating semantic XML of any kind, all the XHTML If you want to keep some or all the Examples: |
| List of user-defined style names separated by space characters. Default: “” (empty list). | Global variable defined in Empty paragraphs having a user-defined style found in this list will not be deleted by |
| List of user-defined style names separated by space characters. Default: “” (empty list). | Global variable defined in The CSS classes used to apply the user-defined styles specified in this list will not be removed by Note that specifying both parameters |
| An integer greater or equal to 1. Default: -1. No maximum level. | Global variable defined in Wrap sequences of elements starting with a This parameter specifies the maximum level of nesting for such sections. |
Simple conversion specifications
Above parameter blocks.convert
(respectively inlines.convert
) provides the user of w2x with a simple mean to convert p
(respectively span
) elements having certain paragraph (respectively character) styles to XHTML elements possibly having attributes.
The syntax of a simple conversion specification is:
spec → simple_spec [ S ‘!’ S simple_spec ]* simple_spec → style_spec S XHTML_element_qname [ S attribute_spec ]* style_spec → style_name | style_pattern style_pattern → ‘/’ pattern ’/’ | ‘^’ pattern ‘$’ attribute_spec → attribute_qname ‘=’ quoted_attribute_value quoted_attribute_value → “’” value “’” | ‘”’ value ‘”’
Note that when specifying a XHTML_element_qname, you must restrict yourself to XHTML 1.0 Transitional elements. Specifying for example, XHTML 5.0 elements such as mark
, aside
, section
, etc, will not give you the results you’ll expect.
Examples: stock styled span conversions used by w2x:xed/inlines.xed
:
/Emphasis$/ em ! c-Strong strong ! c-BookTitle cite ! /((IntenseReference)|(SubtleReference)|(QuoteChar))$/ em ! /((itleChar)|(Heading\d+Char))$/ strong
Custom styled span conversions used to process this manual:
c-Code code
Stock styled paragraph conversions used by w2x:xed/blocks.xed
:
/Quote$/ p g:id='blockquote' g:container='blockquote'
Custom styled paragraph conversions used to process this manual:
p-Term dt g:id="dl" g:container="dl" ! p-Definition dd g:id="dl" g:container="dl" ! p-ProgramListing span g:id="pre" g:container="pre"
Automatic grouping of the XHTML elements which are the results of the styled paragraph conversions
In the above examples, attributes having names prefixed with “g:
” are in the “urn:x-mlmind:namespace:group
” namespace. These attributes are called grouping attributes. Examples: g:id
, g:container
.
When parameter blocks.convert
is used to create XHTML elements having grouping attributes, command group() is automatically invoked at the end of all the styled paragraph conversions. To make it simple, this command groups consecutive XHTML elements having the same g:id
attribute into a common parent element. The parent element is specified by attribute g:container
.
In the above examples,
p
elements having grouping attributes g:id='blockquote'
and g:container='blockquote'
are grouped into a common blockquote
parent element.dt
and dt
elements having grouping attributes g:id="dl"
and g:container="dl
are grouped into a common dl
parent element.span
elements having grouping attributes g:id="pre"
and g:container="pre"
are grouped into a common pre
parent element.