4.1 Converting to XHTML from the command line
To convert a file to XHTML use the command line
w2l -xhtml|-xhtml+mathml|-xhtml+mathml+xsl [-config <configfile>] <writer document to convert>
The parts in square brackets are optional.
This will produce an XHTML file with the same name as the original document, but a different file extension.
The option -xhtml+mathml is used to produce XHTML 1.1 + MathML 2.0, the option -xhtml+mathml+xsl produces the variant using XSL transformations.
Examples:
w2l -xhtml+mathml+xsl mydocument.sxw
or
w2l -xhtml -config clean.xml mydocument.sxw
If you specify the -config option, Writer2xhtml will load this configuration file before converting your document. You can read more about configuration in section 4.3.
The script w2l also provides a shorthand notation to use the sample configuration file included in writer2latex032.zip. The command line is
w2l -cleanxhtml <writer document to convert>
This configuration file produces a ”clean” xhtml file (see section 4.4), for example:
w2l -cleanxhtml mydocument.sxw
It is recommended that you extend w2l / w2l.bat to support your own configuration files.