FlexDoc/XML - Generator

Output Formats
Because the Template Processor simultaneously acts as both the template interpreter and the output generator, its generic part is extended into several implementations targeted to one of the following currently supported output format: Which particular output format will be used is specified either:- Via the generator.config, which is edited using the generator GUI. In particular, the output format is specified in the «Output format» combo-box.
-
Using the
-format
option on the generator Java command line.
What are Output Format Options?
Output format options are those generator settings that are handled by the generator itself (its Java-hardcoded part) and relevant only to the selected output format. Most of them are not accessible in templates. However, in other respects format options are similar to template parameters.All format options can be specified/edited in the generator GUI using the Format Option Inspector:
Alternatively, any output format option can be specified directly on the command-line by its internal name with the -o option. The option internal name can be found in the Option Inspector. Just find that option in it and select. The internal name (also called simply Option Name) will be visible at the top of the bottom «Option Description» panel:
For example:
-o:html.output.css.namedRules.customRuleFile=C:\flexdoc-xml\XSDDoc\templates\css\azure-theme.css
- or
-o:html.output.css.namedRules.customRuleFile "C:\flexdoc-xml\XSDDoc\templates\css\azure-theme.css"
HTML Output
HTML Options
When in the Generator Dialog you select HTML output format and click «Options» button, you will see the following HTML Option Inspector dialog (click on the screenshot to see the corresponding option description):
Option | Name / Type / Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Output | The options to control various properties of the generated HTML output as a whole. | ||||||||||||||||||||||||
Markup |
html.output.markup : enum {"html401", "xhtml1"}
Specify the (X)HTML markup version of the generated output. Possible Choices:
|
||||||||||||||||||||||||
Charset |
html.output.charset : string
Specifies the character set (encoding) of the generated HTML files. The name should be a preferred MIME name (canonical name) as given in the IANA Registry. The default charset is UTF-8. If the charset name is specified as empty (blank), the Java machine's default charset will be used. |
||||||||||||||||||||||||
Add charset |
html.output.charset.add : boolean {true, false}
Specifies whether to insert the charset declaration in the generated HTML files. The charset name will be obtained from the option: Output | Charset
For example, when this option is selected (
|
||||||||||||||||||||||||
Suppress timestamp |
html.output.noTimeStamp : boolean {true, false}
Specifies whether to suppress the date/time information included in a special comment inserted automatically at the beginning of every generated HTML file, which looks as follows:
true ), such a comment is still inserted,
however without the current date/time:
Besides affecting the automatic HTML comment, this option is also passed
to templates via
You may want to avoid getting the current date/time into the generated doc files,
when you frequently upload them to some repository, which stores only changes of files
against their previous versions. If your docs actually do not change,
this will prevent the repository from storing unnecessary information.
'output.noTimeStamp' property available in FlexQuery
expressions. So, if a template is programmed to display the generation's date/time
on some page, it may suppress that as well, according to the setting of this option.
|
||||||||||||||||||||||||
HTML pattern file |
html.output.documentPatternFile : file pathname
This option allows you to frame the output generated by FlexDoc into your own HTML file. This may be useful when you need to insert into the generated HTML some extra lines with special settings. To do this, you will need to prepare a special HTML pattern file with the content as follows:
Anything else is up to you to fill in. Just make sure your markup is valid HTML or XHTML (if you selected one; see the option: Output | Markup). You may also use a few macros expanded to the values provided by FlexDoc:
'index.html' )
is not affected by this setting.
|
||||||||||||||||||||||||
CSS |
The group of options related to formatting of HTML output, which is done through Cascading Style Sheets (CSS).
For details, see: FlexDoc.XYZ | Documentation | Usage of CSS in generated HTML | HTML Generator Options for CSS |
||||||||||||||||||||||||
Generate style sheet file |
html.output.css.file : boolean {true, false}
Specify whether to generate the external CSS file (global style sheet).
When this option is selected (
false ), no external style sheet file will be generated.
In that case, all CSS rules used in the generated HTML will be defined
locally within those HTML files themselves, inside <style> element.
|
||||||||||||||||||||||||
CSS pattern file |
html.output.css.file.pattern : file pathname
Specify a CSS pattern file to frame the generated global style sheet into your own CSS file. |
||||||||||||||||||||||||
Include anonymous rules |
html.output.css.file.anonymRules : boolean {true, false}
Specify whether all generated anonymous CSS rules must be stored in the external CSS file (global style sheet). Anonymous CSS rules are CSS rules generated from the formatting settings specified on template components. They are called “anonymous” because these are basically sets of inline CSS properties initially generated for particular HTML tags and, then, moved to a style sheet to eliminate their repeating across the HTML file(s). Now, only class selectors assigned to those CSS rules are specified in the HTML tags (instead of the original CSS properties). But the class selectors are generated automatically, which depends on how early a particular CSS property set was registered in the style sheet. That makes them completely unpredictable and dependent on the data being documented, which prohibits substituting the anonymous rules with any custom ones. When this option is selected (true ),
all anonymous rules generated across all generated HTML files
will be collected in the global style sheet
(which is printed further as the external CSS file).
That produces the most compact documentation files, since many anonymous rules repeat themselves
across different HTML document. So, it is the default setting.
When this option is unselected (
|
||||||||||||||||||||||||
Generate named rules |
html.output.css.namedRules : enum {"none", "all", "selected"}
Specify whether to generate named CSS rules.
Named CSS rules are CSS rules generated from the formatting styles defined in templates.
When such a style is assigned to a template component, the HTML tags generated by that component can be assigned with the CSS rule generated from that style.
The class selector assigned to that CSS rule is specified in the template style itself (or derived from its name).
Therefore, it has a constant (predictable) relationship with both the particular CSS property set produced from that style and the particular
output structures where that CSS rule is applied. This opens a possibility to substitute the generated named CSS rules with the
custom ones.
Possible Values:
Please note that named CSS rules are not required for proper HTML output and will only increase its size. You need named rules only when you want to style the generated HTML documentation with your own CSS properties/rules. "none"
|
||||||||||||||||||||||||
Include descriptions |
html.output.css.namedRules.descriptions : boolean
Specify whether to add the descriptions of template formatting styles to the named CSS rules generated from them.
When this option is selected (
When this options is unselected ( |
||||||||||||||||||||||||
Custom rule file |
html.output.css.namedRules.customRuleFile : file pathname
Specify a (CSS) file with custom definitions for some of the automatically generated default and named CSS rules. For more details, please see: How to substitute generated CSS rules with custom ones? |
||||||||||||||||||||||||
Units |
html.output.css.units : enum {"relative", "pixels", "points"}
Specify measurement units used in the generated HTML.
This applies to font sizes and most of length values (like spacing, margins, paddings etc.),
which are specified as properties of CSS rules
generated directly from the formatting properties of template components
and template formatting styles.
Possible Values:
Note: A few length values are always specified in pixels (e.g. border width), because otherwise their effect would be highly unpredictable.
|
||||||||||||||||||||||||
html.output.css.extraFiles : file pathname list
Specify one or more additional (custom) CSS files that should be included in the generated documentation, using which you can provide some special CSS classes and rules to style your descriptions (specified in annotations, doc-comments etc.) Those files are copied as is into the documentation destination (associated files) directory, and links to them are inserted in every generated HTML document, e.g.
The links to extra CSS files are inserted before the link to the default stylesheet file generated by FlexDoc. See the option: CSS | Generate stylesheet file Each extra CSS file should be specified with its absolute file pathname. Multiple file pathnames are separated with the system-dependent path-separator character (e.g.';' or ':' ).
If you select files using the file chooser, all of the above is ensured automatically.
|
|||||||||||||||||||||||||
Text | The group of options to control the processing of text (character data) supposed for printing in the output. | ||||||||||||||||||||||||
Render embedded HTML |
html.text.renderEmbeddedHTML : boolean {true, false}
Specifies whether to render (interpret) embedded HTML markup. Embedded HTML markup are HTML tags found in the plain text supposed for printing in the output. Such text typically comes directly from the data source (e.g. doc-comments or annotations). However, it may be specified in templates as well. Rendering of that HTML markup means adding the formatting encoded with it to the primary formatting specified in templates. When this option istrue (checked), all custom HTML tags will be passed to the output as is.
That means, all your XHTML tags specified in your XSD annotations
will be converted to normal HTML tags and get into the output exactly where you specified them (including all attributes).
When this option is |
||||||||||||||||||||||||
Fix markup |
html.text.renderEmbeddedHTML.fixMarkup : boolean {true, false}
This option allows you to fix custom HTML markup, when it is invalid (e.g. <b> tag is open, but never closed),
so as not to distort the entire page content after that. When it is In case of HTML markup in XSD annotations, this option has little use since the correctness of embedded XHTML is already enforced by general XML rules. However, it may be important when custom HTML tags are specified by some other means (e.g. see the parameter: Descriptions | HTML Markup | Encode markup characters) |
||||||||||||||||||||||||
Render line breaks |
html.text.renderLineBreaks : boolean {true, false}
Specify whether the newlines (i.e. This option may be useful, when the text to be printed is just plain text and the newlines originally specified in it are used to make the text more readable.
If this option is selected (
That will work only when no rendering of embedded HTML markup is activated for that text.
If you use HTML markup to format your text, any line breaks must be specified directly using <br> tags.
For details, see the option: Text | Render embedded HTML
If this option is unselected (false ), nothing will be done about '\n' codes,
so they will get in the output as is, which in the case of (X)HTML is treated just as white space.
|
Custom Style Sheet
Since the version 1.9.0 it is possible to substitute some of the generated CSS rules with your custom ones. This allows you to adjust (to some extent) how the generated documentation looks without changing the templates.For further details, please see: FlexDoc.XYZ | Documentation | Usage of CSS in generated HTML
RTF Output
RTF Options
When in the Generator Dialog you select RTF output format and click «Options» button, you will see the following RTF Option Inspector dialog (click on the screenshot to see the corresponding option description):
Option | Name / Type / Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Styles | The group of options related to RTF styles | ||||||||||||||||||
Include paragraph styles Include character styles |
rtf.styles.include.parStyles : boolean {true, false} rtf.styles.include.charStyles : boolean {true, false}
These two options specify whether paragraph/character styles should be included in the generated RTF.
When the option is
When the option is
You may need to disable the inclusion of style information in some situations, when the generated RTF is intended
primarily for using in non MS Word applications. Certain RTF importers, although appear to understand most of the
RTF settings quite well, nevertheless, may produce such a mess with the styles imported from an RTF that the result
document may look considerably distorted.
|
||||||||||||||||||
Attached Template |
rtf.styles.attachedTemplate : file pathname
This option allows you to attach your MS Word document template (.dot file) to the generated RTF document. This template may override the formatting styles originally specified in FlexDoc templates. MS Word uses the styles contained in dot-files to dynamically replace the formatting of equally named styles contained in RTF documents. The styles are connected by their full names. For example, let's assume that in your dot-file you have a paragraph style named "My Cool Style" that you want to use in your docs. Then, you will need to define a paragraph style in the template exactly with that very name "My Cool Style". To define a style in the Template Designer, you should go to the File | Styles menu item which invokes the Formatting Styles dialog. Once the "My Cool Style" paragraph style is defined in your template, you may or may not specify in that style some formatting properties as you like, which actually doesn't matter as you wish to override them with the dot-file. Then, you should assign that style to the specific template components whose output you want to format using the dot-file. In particular, you should specify the 'Style' setting in the component's Properties Dialog -> Formatting -> Paragraph (or Text) tabs. Note, that other formatting settings in those tabs should be specified as 'default'. In accordance with RTF rules, the local formatting settings different from those defined in the template styles will have the higher priority over the styles and, therefore, will not be overridden by dot-files.
This setting will work only when the corresponding options are selected:
|
||||||||||||||||||
Text | The group of options to control the processing of source texts (character data) | ||||||||||||||||||
Render embedded HTML |
rtf.text.renderEmbeddedHTML : boolean {true, false}
Specifies whether to render (interpret) embedded HTML markup. Embedded HTML markup are HTML tags found in the plain text supposed for printing in the output. Such text typically comes directly from the data source (e.g. doc-comments or annotations). However, it may be specified in templates as well. Rendering of that HTML markup means adding the formatting encoded with it to the primary formatting specified in templates. When this option istrue (checked), all custom HTML tags will be parsed and rendered with the appropriate features of RTF.
That's pretty much complicated processing and only limited set of HTML tags is supported in this way. Any other tags will be ignored.
See: FlexDoc/XML | Features | Formatting | Rendering of embedded HTML
When this option is
This setting affects only the output of those template components whose 'Render embedded HTML' option is checked.
That option is located at the component's Properties Dialog | Formatting | Text Flow tab.
When such an option is not specified, any markup contained in the component's output will be treated as an ordinary text.
|
||||||||||||||||||
Render line breaks |
rtf.text.renderLineBreaks : boolean {true, false}
Specifies whether the newlines (
You may use newlines in your annotation text just to make it more readable during the editing, with no intent to see it broken into the same line
in the generated documentation. However, you may use the original newlines also as a simple way of formatting your text.
When this option is true (checked), all '\n' codes will be rendered with the new line in RTF (i.e. \line controls).
When this option is |
||||||||||||||||||
Hypertext | The group of options controlling the generation of hyperlinks and bookmarks | ||||||||||||||||||
Generate hyperlinks |
rtf.hypertext.hlinks : boolean {true, false}
Specify whether to add hyperlinks in the RTF output. Hyperlinks will be highlighted with a special style specified for hyperlinks in templates (typically, blue text with underlining).
To allow cross-reference hyperlinks (those pointing within the same document)
being generated, the "Generate bookmarks" option must be selected as well.
Without it, only external (URL) hyperlinks will be possible.
|
||||||||||||||||||
Generate bookmarks |
rtf.hypertext.bookmarks : boolean {true, false}
Specify whether to add bookmarks in the RTF output. Bookmarks are needed to generate both cross-reference hyperlinks and page number references. |
||||||||||||||||||
Bookmark name prefix |
rtf.hypertext.bookmarks.prefix : string
Specify prefix for automatically generated bookmark names.
When the name of a bookmark is generated automatically, it is made of some prefix (the same for the whole RTF document)
and an internal bookmark number (about which it is certain only that it is unique within that document).
For example, if the prefix is
'125' is the bookmark number.
The default bookmark name prefix is When you need to merge several RTF files produced with FlexDoc into a single document, you should generate those files with different bookmark prefixes. This will ensure that the bookmarks from different RTFs never overlap and all hyperlinks and page number references in the result document are correct.
The generation of the bookmarks is specified in templates in the "Hypertext" properties of particular template components.
In those properties, it is also possible to assign a formula expression that will generate specific bookmark names.
The bookmark names produced by such formulas will never be changed (no additional prefix will be added to them).
The prefix is used only when a bookmark name is produced completely automatically by the generator (without any programming
about it in the template).
|
||||||||||||||||||
Tables | The group of options controlling the generation of tables in RTF | ||||||||||||||||||
Allow auto resize table cells |
rtf.tables.allowAutoFit : boolean {true, false}
Allows table cells to be automatically resized to fit their contents.
When this option is
This will affect only those tables generated by the template components with the specified setting:
Formatting | Table | Auto resize to fit contents
In Microsoft Word, that RTF setting will activate the
"Automatically resize to fit contents" option for the given table.
You may want to disable the table autofit for some reasons. For instance, some RTF readers do not interpret it (e.g. LibreOffice) or even in MS Word there is a problem with wrapping of long non-breaking strings within tables with autofit. |
||||||||||||||||||
Break long nonbreaking strings |
rtf.tables.breakLongStrings : boolean {true, false}
Specify whether to break automatically the long non-breaking strings placed within the tables with the table autofit setting (see the option: Tables | Allow auto resize table cells). This option addresses a problem with wrapping of very long non-breaking strings within table cells. Some of your data may be represented in the generated documentation by long strings without spaces. For instance, this may be very long qualified names of Java classes, some character patterns and so on. MS Word interprets such strings as single non-breaking words. (This happens also when all spaces in a string are non-breaking.) The problem arises when non-breaking strings are placed in table cells. Many FlexDoc templates use tables as layouts, so lots of text data is put in table cells. To have a table-based layout to be arranged correctly, the table autofit RTF setting is specified with those tables. MS Word normally arranges such tables correctly and wraps the text as needed. But this works well only when the text consists of not too long words separated with spaces. When there are long sequences of characters without spaces, MS Word does not wrap them. Instead, it produces a table so wide that it is "displayed" beyond the page, making some data invisible in the result document. Unfortunately, we have found no reliable natural way to force MS Word to wrap long non-breaking strings and arrange the table containing them correctly. (That's probably because MS Word is focused mainly to process hand-written documents rather than to layout correctly something generated automatically.) To work around that problem, the RTF output generator breaks long non-breaking strings automatically by itself according to certain estimations. Because that breaking is not always perfect, a group of options was introduced in order to control it (see nested options). |
||||||||||||||||||
Maximal unbroken length |
rtf.tables.breakLongStrings.maxNbrLength : integer
Specify the maximum character length for a non-breaking string (i.e. non-wrapping text) allowed to be left unbroken. This option allows you to define what a long non-breaking string actually is, thereby preventing from breaking some fairly long words and names. Those strings that do not exceed the specified length will not be affected by the automatic breaking. |
||||||||||||||||||
Maximal unbroken width |
rtf.tables.breakLongStrings.maxNbrWidth : percent
Specify the maximal width for a long non-breaking string (i.e. non-wrapping text) allowed to be left unbroken. The purpose of automatic breaking of strings is to help MS Word to wrap those strings within table cells. When it is possible to estimate that for a given table configuration a string will fit into it without breaking, no breaking is actually needed (as it always distorts the original text). Using the font face and size specified in the template, the RTF generator is able to estimate the width occupied by a string. It is also possible to determine the approximate maximum width available for a table. This option specifies the percent of the table width in which any non-breaking string should be wrapped. For example, when the option value is 50, each long non-breaking string placed in a table will be broken so to wrap within approximately half of the estimated table width. The 75 percent will wrap the strings into 3/4 of the estimated table width. When the table is nested within other table(s), the topmost table is used as a base for the wrapping estimation. The zero (default) value assigned to this option has a special meaning. In that case, the percentage of the table width available for wrapping will be obtained from the "Formatting | Table Cell | Options | Max width allowed for long non-breaking strings" setting specified in the template control that generates the given table cell (in which the string is placed). In most cases, this actually allows for much better adjustment of the string wrapping.
However, even this is not waterproof – the reason why this option is exposed here.
At last, if the percentage value found in the template is 0, the default 50% is used.
|
||||||||||||||||||
Use optional breaks |
rtf.tables.breakLongStrings.useOptionalBreaks : boolean {true, false}
Specify whether to use 'Non-width Optional Breaks' when breaking long strings for wrapping.
The 'Non-width Optional Break' is a pseudo-symbol provided by MS Word
(the RTF equivalent is However, the problem with 'Non-width Optional Break' is that some RTF readers do not interpret it. That's why this option was introduced.
If wrapping of long nonbreaking strings does not work, try to unselect
( |
||||||||||||||||||
Never keep rows together |
rtf.tables.neverKeepRowsTogether : boolean {true, false}
If you encounter a problem with the disappearance of a piece of your text in the generated RTF, this option may help you. Please read the explanation.
If this option is checked ( Some templates may be designed so that tables generated by them will be specified to keep together on a single page. When such a table does not fit on the rest of the current page, instead of breaking it across pages, the RTF renderer should start this table from the next page. That works fine as long as the content of each cell in the table is not too large. However, in MS Word, there may be a problem with that. When a text contained in a table cell is so large that it does not fit on a single page, MS Word will not break such a table row automatically regardless of its settings. If the row containing this cell is set to keep on a single page, you simply won't find a piece of your text in the document at all. MS Word will "display" it beyond the page boundaries! If you have such a problem, try to check this option and generate your document again. Most likely, you will find the whole text in the right place after that. |
||||||||||||||||||
Images | The image related options | ||||||||||||||||||
Store graphics in RTF |
rtf.images.storeGraphicsInRTF : boolean {true, false}
If
If See also: FlexDoc/XML | XSDDoc | FAQ | How to insert images using HTML markup? |
||||||||||||||||||
Show failed image paths |
rtf.images.showFailedPaths : boolean {true, false}
When an image specified by a pathname (or URL) is not found or cannot be loaded, it is replaced with a placeholder (i.e. a special icon indicating the image failure).
If this option is
Since the file pathnames tend to be long non-breaking strings,
showing them in the generated document may considerably distort its formatting layout.
That's why this option was introduced.
|
||||||||||||||||||
Allow image rotation |
rtf.images.allowRotation : boolean {true, false}
Allows the automatic rotation of large images to better fit tem in the specified paper size so as to minimize the image scaling. Currently, this is supported only for the element images (diagrams) generated in PNG format and only when all graphics is stored in RTF files.
The rotation should also be enabled in the template Image Controls generating those images.
|
||||||||||||||||||
Page Settings |
This group of options allows you to configure the page layout used in the generated RTF.
These are the same settings as specified in
Here, you can override some of them to better fit your needs.
Most of these options work so that when an option is set as default,
the corresponding value from the main template will be used.
|
||||||||||||||||||
Orientation |
rtf.page.orientation : enum {"Portrait", "Landscape"}
Specify the page orientation used in the generated RTF document. This option overrides the corresponding property of the main template:
Some template sets may support the dynamic switching of page orientation selectively for specific sections of the generated output.
That behavior cannot be overridden with this option and is controlled rather through template parameters.
See also the FlexQuery GOM property:
Template Designer | Help | Generator Object Model | output | pageOrientation
|
||||||||||||||||||
Size |
rtf.page.size : enum {"A4", "Letter", "Legal", "A3", "Custom"}
Specify the page size used in the generated RTF document. This option overrides the corresponding property of the main template:
|
||||||||||||||||||
Width Height |
rtf.page.size.width : number
Specify the page width/height. The values of these options are implied from the page size and can be changed only for Custom page size. |
||||||||||||||||||
Margins |
The group of options to specify the page margins used in the generated RTF document.
These options override the corresponding property group of the main template:
If you need to set very narrow margins, you can use the following settings:
|
||||||||||||||||||
Top |
rtf.page.margin.top : number
Specify the page top margin. It is the distance between the top edge of the page and the top edge of any regular page content (e.g. text). That means, the top margin must also reserve the spacing for the page header (if any required) and be calculated as follows:
|
||||||||||||||||||
Bottom |
rtf.page.margin.bottom : number
Specify the page bottom margin. It is the distance between the top edge of the page and the bottom edge of any regular page content (e.g. text). That means, the bottom margin must also reserve the spacing for the page footer (if any required) and be calculated as follows:
|
||||||||||||||||||
Left |
rtf.page.margin.left : number
Specify the page left margin. It is the distance between the left edge of the page and the left edge of any regular page content (e.g. text). This option overrides the corresponding property of the main template:
|
||||||||||||||||||
Right |
rtf.page.margin.right : number
Specify the page right margin. It is the distance between the right edge of the page and the right edge of any regular page content (e.g. text). This option overrides the corresponding property of the main template:
|
||||||||||||||||||
Header |
rtf.page.margin.header : number
Specify the page header margin. It is the distance between the top edge of the page and the top edge of any content that serves as the page header (e.g. a line of text). This option overrides the corresponding property of the main template:
|
||||||||||||||||||
Footer |
rtf.page.margin.footer : number
Specify the page footer margin. It is the distance between the bottom edge of the page and the bottom edge of any content that serves as the page footer (e.g. a line of text). This option overrides the corresponding property of the main template:
|
||||||||||||||||||
Mirror |
rtf.page.margin.mirror : boolean {true, false}
Specify whether the margin definitions should be automatically switched on left and right pages. That will allow you to print on both sides of each paper sheet so that the wider margin will be always on the same place that will help you to bind everything as a single booklet. |
||||||||||||||||||
Measurement Units |
rtf.page.units : enum {"mm", "in"}
Specify the measurment units used in page settings. |
||||||||||||||||||
Other Options | Miscellaneous options | ||||||||||||||||||
Tune output for |
rtf.misc.tuneFor : enum {"ms_word", "docx", "libre_office"}
This option allows you to instruct the generator to adjust the RTF formatting settings specifically for some of the most common applications of RTF.
RTF is a rich text format that although allows you to express almost any document formatting concept, the exact interpretation
of all that is rather loose and may substantially vary by different applications (RTF readers). Especially, it concerns more complex features
(like the relationship between borders, paddings and margins; adjustment of table column widths and other things).
So, to achieve that the generated RTF output looks properly in a particular application, those things need to be determined experimentally
and the corresponding RTF settings corrected accordingly.
Possible Settings:
"MS Word"
|
||||||||||||||||||
Suppress timestamp |
rtf.misc.noTimeStamp : boolean {true, false}
Specifies whether to suppress the date/time information included in a special comment inserted automatically at the beginning of every generated RTF file, which looks as the following:
true ), such a comment is still inserted,
however without the current date/time:
Besides affecting the automatic RTF comment, this option is also passed
to templates via
You may want to avoid getting the current date/time into the generated doc files,
when you frequently upload them to some repository, which stores only changes of files
against their previous versions. If your docs actually do not change,
this will prevent the repository from storing unnecessary information.
'output.noTimeStamp' property available in FlexQuery
expressions. So, if a template is programmed to display the generation's date/time
in the document, it may suppress that as well, according to the setting of this option.
|
Updating RTF fields in MS Word
The RTF documentation generated by the provided templates heavily uses document fields (for such things like page number references, number of pages and so on).When you load the generated RTF in MS Word, to have the fields display the correct values, you will need to update them. To do this, please type: Ctrl+A, then F9.
Including generated RTF in larger Word document
Your task is the following. You have prepared a certain static Word document and need to include into it the output generated with FlexDoc so as each time your XML documentation is regenerated, the larger Word document is updated as well.Here is how you can do that.
You should insert into your Word document an INCLUDETEXT field. Using the MS Word menu, it may be done like this:
- Insert | Field... | Categories: Links and References | Field names: Include Text
-
{ INCLUDETEXT "C:\\blah\\blah\\XMLDoc.rtf" \* MERGEFORMAT }
-
C:\blah\blah\XMLDoc.rtf
After that, you can generate with FlexDoc the XMLDoc RTF. To prepare the result big document, open it with MS Word. Then, press Ctrl+A (select all) and F9 (to update fields).
Including static Word document into generated RTF
Now, the task is the opposite. You have prepared some static Word document and need to include it somewhere in the RTF document generated by FlexDoc.That is possible too. However, you will need to specify this in some template (because only templates eventually generate any output). Therefore, you will need to use the Template Designer.
In some template location, which is determined by where you need to insert your Word document, you should specify a Data Control as shown on the screenshot (the rectangle with "Include Text ..."):
When you generate an RTF file with that template and open it in MS Word, you will see in it a field like this:
Generating RTF for non-Word applications
The RTF generated by FlexDoc/XML may be successfully imported into OpenOffice.org Writer, Adobe FrameMaker and probably many other (non MS Word) software.To make the RTF look better in other applications, before generating it, you may change the option:
e.g. in RTF Options Inspector or on the Java command line with the -o option like:-o:rtf.misc.tuneFor=libre_office
- Other Options | Tune output for = "ms_word"
Although Microsoft is the originator of RTF format, the MS Word itself appears to have some oddities of rendering certain RTF settings, even though those settings may well follow the RTF specification. For instance, when displaying the paragraph or table borders, their horizontal positions may be shifted (e.g. when MS Word interprets horizontal margins of a paragraph, it draws the paragraph borders and paddings within the specified margin space but not within the paragraph content as it might be natural).
To overcome this, in such cases, we adjust the initial dimensions in the opposite way so as the result formatting would look properly in MS Word (e.g. to make the actual paragraph margin look as intended the margin width specified in RTF is increased by the paragraph border and padding widths).
However, when you generate RTF to display it primarily not in MS Word but rather in different viewers or editors (e.g. LibreOffice.org under Linux), which interpret the original RTF specification more literally, those specific adjustments may cause a visible distortion of the intended formatting of the document. In such cases, we recommend to try with different values of this option.
Plain-Text (TXT) Output
TXT Options
When in the Generator Dialog you select TXT output format and click «Options» button, you will see the following TXT Option Inspector dialog (click on the screenshot to see the corresponding option description):
Option | Name / Type / Description |
---|---|
Charset |
txt.charset : string
Specifies the character set (encoding) of the generated plain text files. The name should be a preferred MIME name (canonical name) as given in the IANA Registry. The default charset is UTF-8. If the charset name is specified as empty (blank), the Java machine's default charset will be used. |
Render embedded HTML |
txt.renderEmbeddedHTML : boolean {true, false}
When this option is
This setting affects only output of those template components whose 'Render embedded HTML' option is specified.
This option is located at the component's Properties Dialog | Formatting | Text Flow tab.
When such an option is not specified, any markup contained in the component's output will be treated as an ordinary text.
|
Using plain-text output to generate auxiliary files
The most important use of plain-text output is the generation of various auxiliary files (like JavaScripts) that complement the generated documentation with extended functionality.The settings for such auxiliary plain-text output are specified the same as for the main format. See TXT Options.
For instance, the framed HTML XML Schema documentation generated by XSDDoc includes the dynamic search functionality, which is implemented using JavaScript. The search indexes, which are equally JavaScript files with index arrays, are generated by special templates that must produce the plain-text JavaScript files even though the main output format is HTML.The following screenshot shows the search.tpl template open in the Template Designer. That template itself generates the Search Page, which is an HTML. However, on the way, it calls from itself also several other templates (e.g. search-indexes.tpl) that generate JavaScripts required for the dynamic search to function.