79. viewHTML

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:

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>