100. XXE.new

Parameter syntax:

[ (configuration_name template_name | '- -') [ save_file_or_URL | '-' ]? ]?

Creates a new document by copying a named template (that is, a document template which has been declared in an XXE configuration file).

Parameters:

configuration_name

Specifies the name of the configuration where the template has been declared. Example: "XHTML Strict".

Specified name is compared to the name of a configuration in a case-insensitive way. Example: both "XHTML Strict" and "xhtml strict" should work fine.

template_name

Specifies the name of the document template. Example: "Page".

Specified name is compared to the name of a template in a case-insensitive way. Example: both "Page" and "page" should work fine.

Note that the name of a template is localized. For example, when XXE is run using a German locale, a template specified as "Page" will not be found because in German, "Page" is translated to "Seite". However when a template is not found by its (possibly localized) name, it is also searched by the basename (without any extension) of its file. Thus it is safer to specify "page_strict" (corresponds to template file XXE_install_dir/addon/config/xhtml/template/page_strict.html) rather than "Page" or "Seite".

When configuration_name and template_name are absent or specified as "- -", the command displays the FileNew dialog box to let the user specify a document template.

save_file_or_URL

When this argument is specified as a filename or URL, the newly created document is immediately saved to specified location.

When this argument is specified as "-", the command displays the file chooser dialog box to let the user specify a save location for the newly created document. After this, the newly created document is immediately saved to specified location.

When this argument is absent, the newly created document is automatically given a save location but it is not actually saved to this location (that is, the command behaves like menu item FileNew).

Returns newly created com.xmlmind.xmledit.doc.Document (for use by higher-level commands) or Command.EXECUTION_FAILED if specified template cannot be opened or if user has canceled the command.