Parameter syntax:
URL or filename
Use web browser to view specified file. If the parameter contains a relative URL or filename, this relative location is resolved against the location of the document being edited.
Specified file does not necessarily contain HTML; suffice for a file to have a content supported by the web browser.
The web browser used by this command is determined as follows:
If system property XXE_HTML_PREVIEW_COMMAND
has been defined, the value of this property is used as the template for the command which launches the browser.
Configuration element property
makes it easy specifying such system property. Example: add this property
element to your customize.xxe
in order to preview XHTML files using Firefox:
<property name="XXE_HTML_PREVIEW_COMMAND">firefox "%U"</property>
Otherwise
On Windows:
start "" "%U"
On MacOS X:
open "%U"
On Linux:
(mozilla -remote "openURL(%U)" 1> /dev/null 2>&1) || (mozilla "%U" &)
Note that, unlike Netscape 4, Mozilla does not support the -raise
option, nor automatically brings its window to front.
Variable %U
is substituted with the parameter of the command (possibly after converting a filename to an URL) before the command is executed.
Note that on Unix, there is no need to end the command template with a '&
'.
Example of use:
<command name="docb.startHTMLViewer"> <macro> <sequence> <get context="$implicitElement/@url" expression="resolve-uri(.)" /> <command name="viewHTML" parameter="%_" /> </sequence> </macro> </command>