Parameter syntax:
[ (category_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).
When category_name
and template_name
are absent or specified as "- -
", the command displays the → dialog box to let the user specify a document template.
Parameters:
category_name
Specifies the (case-insensitive) name of the category of the document template. A category consists in one or more segments separated by character '/'
.
By default, the category of a document template is the name of the configuration in which this template has been specified.
Example 1: actual category : XHTML/1.0
or xhtml/1.0
(category "XHTML/1.0
" includes all the templates specified in configurations "XHTML Strict
" and "XHTML Transitional
").
Example 2: actual category : XHTML/5.0
or xhtml/5.0
(category "XHTML/5.0
" includes all the templates specified in configuration "XHTML 5.0
").
Example 3: category which is in fact a configuration name: DocBook
or docbook
(the document templates of DocBook 4 are not sorted into categories).
Example 4: category which is in fact a configuration name: "Simplified DocBook
" (the document templates of Simplified DocBook are not sorted into categories).
template_name
Specifies the (case-insensitive, possibly localized) name of a document template. Example: "Seite
(Streng)" ("Page (Strict)
" in German).
Alternatively, you can specify the basename (without any extension) of the file containing the document template. Doing this should work whatever your locale. Example: "page_strict
".
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
→ ).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.
Examples:
XXE.new XXE.new - - XXE.new - - - XXE.new - - /home/john/doc.xml XXE.new docbook article XXE.new XHTML/1.0 "HTML Page (Transitional)" XXE.new xhtml/1.0 page_loose /home/jane/site/news.html