Document templates are XML files that include the following information:
Defines the template category (group), where current template should belong. You may use an arbitrary name for the new category, or the name of an existing one.
Specifies pixmap image for current category, which will be shown in Open Document Dialog.
This name together with template category identifies the template in the Open Document Dialog and New Document Dialog. There may be many document templates with different names, but in the same category. Such templates will be grouped in Open Document Dialog and New Document Dialog. You should use only alphanumeric characters and/or spaces for document template name.
Path to the XSL stylesheet used to render the document. Path may be prefixed with the internal Serna variables: $SERNA_DATA_DIR variable keeps Serna installation path; $SERNA_TEMPLATE_DIR variable keeps the current template path.
Path to XML schema for document validation. Path may be prefixed with the internal Serna variables: $SERNA_DATA_DIR variable keeps Serna installation path; $SERNA_TEMPLATE_DIR variable keeps the current template path.
Specifies DTD PUBID for newly created documents.
Specifies DTD SYSID for newly created documents.
Specifies additional catalog that will be visible only for the documents of the current template.
Specifies whether XInclude processing should be enabled for the document. This parameter has boolean type; values yes, no, true, false are accepted. The default is yes.
A regex string applied to the document type declaration of a document (root element and PUBID) when the user chooses the document in the Open Document Dialog. If the regex matches, Serna automatically offers to open the document with this template. See template-priority below.
A regex string applied to the xsi:noNamespaceSchemaLocation attribute value when the user chooses the document in the Open Document Dialog. If the regex matches, Serna automatically offers to open the document with this template. See template-priority below.
A regex string applied to the root element of a document when the user chooses the document in the Open Document Dialog. If the regex matches, Serna automatically offers to open the document with this template. See template-priority below.
A regex string that is applied to the file name of a document (including suffix) when the user chooses the document in the Open Document Dialog. If the regex matches, Serna automatically offers to open the document with this template. See template-priority below.
An integer number designating the template matching priority. If a document matches several templates, a template is chosen according to the following formula: priority = (dtd-guess-string + rootelem-guess-string + filename-guess-string)*100 + template-priority.
If set to true, then this document template will be hidden in the New Document Dialog. If all templates for a category are hidden, the category icon will be hidden as well.
A filename for the category icon for the New Document Dialog and the Document Templates Dialog. The PNG icon file should reside in sernaInstallationPath/icons.
A white-space separated list of elements that will be shown in the New Element Dialog if the user creates a document with that template. This is useful for narrowing the list of elements that the user may use for starting a new document.
An integer number that specifies positioning of the template name in the New Document Dialog and the Document Templates Dialog. The higher the number, the closer to the top the template name will be shown.
It contains two elements: name, and content. The name will appear in the New Document Dialog, as if it is a name for a separate template. Clicking this template name will create a document with the structure, predefined in in the content element. If content is absent, then Choose Element Dialog will be called when creating a new document with this template name.
A boolean value (0 or 1) that designates whether the ContentMap pane is visible when the user opens the document with this template.
Designates the validation mode if the document is open with the template and an XML schema. Allowed values: strict, on, off. By default it is strict
section/figure remark commentThis disallows figure elements to be shown within section, remark, and comment throughout the document. Note that this option does not make usage of these elements invalid, they are just not shown in the New Document Dialog. See also Simple Match Patterns.
section/@roleThis disallows role attributes from being shown within section attributes throughout the document. Note that this option does not make usage of these elements invalid, they are just not shown in the New Document Dialog. See also Simple Match Patterns.
A boolean value (0 or 1) that designates if mouse selection will be balanced when user opens a document with this template. The default is 1.
A white-space separated list of plugin names that will be instantiated if the document is opened with the template.
A boolean value (0 or 1) that designates if tags will be shown when the user opens a document with this template. The default is 0.
The position of the cursor, when the document is opened or created with this template. The position is defined with an Xpath-like expression. Examples:
/book/chapter (first chapter of a book)
/article/section/para[2] (second para of a section in the article)
/section/para/#text[22] (the 22nd position in the text of the first para in the first section)
A wrapper tag, for element folding behavior attributes and large document support.
A white-space separated list of the elements to be collapsed if the document is considered large.
Average number of elements that make up a page. With this value Serna estimates whether the document being opened is large.
The number of pages (containing an average number of elements). If the estimated total for the document is exceeded it is considered to be large.
A white-space separated list of elements that the user will be able to collapse in the document (e.g. you usually do not want to collapse tags like bold). If not specified, the user will be able to collapse any element.
The t:publish elements prescribe how to publish documents for different media/formats. For example, users usually want to publish documents in PDF or HTML. This element drives the content of the Publish Dialog.The t:publish tag contains the following elements:
t:publish entry identifier. Can be any qname (no white-spaces, etc), and must be unique within the template. For example: htmlSingleChunk
This inscription will show up in the Publish Dialog. For example: HTML (one chunk output).
combo-box in theThe generated filename will have this extension. For example: htm
A shell script that will generate the output (published representation). The script is specified according to the following rules:
Script name must be specified without an extension (e.g.: runSaxon) because the following extensions will be automatically added: .sh under Linux ( runSaxon.sh) or .bat under Windows ( runSaxon.bat).
If script name is not absolute, then it will be searched for in the following path: sernaInstallationPath/utils/publishing
Specifies the XSL stylesheet path which will be passed to the publishing script. If the stylesheet path is relative, the base path of the document will be prepended. Also, the stylesheet path can contain the $SERNA_DATA_DIR and $SERNA_TEMPLATE_DIR variables, just as in the xml-stylesheet.
Contains parameters which are relevant to the spell checking.
Specifies list of elements which must be skipped during spell-check. Usually this must be done for elements representing literals, fragments of code, tag names, etc. List of elements to be skipped must be specified according to the rules of Simple Match Patterns.
<t:element-help>$SERNA_TEMPLATE_DIR/myhelp.sehelp</t:element-help>.
For information on creating element help files, please see Creating Element Help.
The depth of the undo/redo stack - the maximum number of the most recent actions that the user can undo/redo.