85. selectConvertedFile

Parameter syntax:

[ 
  [ '[' dialog_box_title ']' ]?

  [ '[processCommand=' process_command_name ']' ]?

  'openFile'|'saveFile'|'openDirectory'|'saveDirectory'|
  'openFileURL'|'saveFileURL'|'openDirectoryURL'|'saveDirectoryURL'|
  saveFileWithExtension=extension|saveFileURLWithExtension=extension

  [ URL_template ]? 

]?

Variant of command selectFile specially designed to be used in Convert macro-commands such as docb.convertToHTML1, xhtml.convertToPS, etc.

Unlike command selectFile, this command is aware of the document being converted, which allows it to suggest smarter save file names/file URLs.

This command supports two more “modes”:

saveFileWithExtension=file extension, saveFileURLWithExtension=file extension

Identical to mode saveFile [saveFileURL], except that, when no URL_template has been specified,

  • saveFile suggests the same file name/file URL as the document being converted, but with an "out" extension.

  • saveFileWithExtension=foo suggests the same file name/file URL as the document being converted but with a "foo" extension.

File extension must not be empty, must not start with a '.' and must not contain spaces or '.'.

This command also has a option [processCommand=process_command_name]. This option adds a "Document conversion parameters" panel to the dialog box. This panel allows to specify parameters for the first XSLT stylesheet (configuration element transform) having a named parameter group (configuration element parameterGroup) found in process command (configuration element command/process) having specified name.

Figure 6.1. The "Document conversion parameters" panel once expanded

The "Document conversion parameters" panel once expanded

Examples:

selectConvertedFile

selectConvertedFile saveFile

selectConvertedFile [Convert to WordML]saveFileWithExtension=wml

selectConvertedFile [Choose An Icon] openFileURL http://www.acme.com/doc/images/logo.gif

selectConvertedFile saveFileURLWithExtension=ps file:///tmp/article.pdf1

selectConvertedFile []2[processCommand=dita.toPS]3 saveFileURLWithExtension=pdf

1

Note that when an URL_template has been specified, this URL_template is always suggested as is by the dialog box. For example, "selectConvertedFile saveFileURLWithExtension=ps file:///tmp/article.pdf" will suggest "file:///tmp/article.pdf" as a save file URL, and not "file:///tmp/article.ps".

2

An empty dialog_box_title may be used to specify default title.

3

Process command dita.toPS looks like this:

<command name="dita.toPS">
  <process>
  ...    
    <transform stylesheet="xsl/fo/fo.xsl" ...>
      ...
      <parameterGroup name="dita.toPS.transformParameters" />
    </transform>
  </process>
</command>