7-48 Administrators Guide for Dynamic Converter
pa href=file3.htmPrevap body
html
file3.htm htmlhead
meta HTTP-EQUIV=Content-Type CONTENT=texthtml; charset=us-ASCII head body
pa href=file2.htmPrevap pIm a programmerp
pand so are youp body
html
There are several things to note here:
■
The page size option value does not apply to the text from the template, only the text inserted from the source document. Each page contains roughly 20 characters
of visible input document text.
■
The { INSERT} of the character set is part of the { HEADER} and therefore is inserted into all the output pages.
■
Text from the body of the unit is inserted sequentially. Thus as is template text such as the line pBelow is the document itselfp is only inserted once.
■
The { ANCHOR} tags only insert links to the previousnext page if there actually is a previousnext page. Thus the first page does not have a link to the
non-existent previous page.
7.9.2 Templates Without { UNIT} Macros
The { UNIT} macro is only required in templates that are designed to break pages based on size using the SCCOPT_EX_PAGESIZEpageSize option. An example of a
template that would not perform any size-based breaking is one that defines an HTML FRAME, but does not include any document content. Another example where
size-based breaking might not be desired is a table of contents page, even though a table of contents page does contain document content.
A template that does not conform to the { UNIT} format is a not a size-based breaking template. Support for this type of template will continue for the indefinite
future. The template will be considered to not be a size-based breaking template if the first macro tag encountered is something other than { UNIT}. This means that there
cannot be any { UNIT}, { HEADER} or { FOOTER} macros later in the template. The value of the SCCOPT_EX_PAGESIZEpageSize option will be ignored for this type
of template.
7.9.3 Indexes and Size-Based Breaking
As mentioned earlier, all repeatable nodes have an associated index variable. See Index Variable Keywords
on page 7-9 for information about using index variable keywords such as Next and Last.
7.10 Using Grids to Navigate Spreadsheet and Database Files
In order to support spreadsheets and database files, though they are not as common, a template-based navigation concept known as a grid is available. Grids offer a way
to consistently navigate a spreadsheet or database in an intuitive fashion.
Script Templates 7-49
Grids can be used to present the output of large spreadsheets in smaller pieces, so that less scrolling is necessary. It can also be used to help prevent the HTML versions of
large spreadsheets from overwhelming browsers, potentially causing them to lock up. Grids can also be used to halt processing of large spreadsheets before they waste too
much CPU time.
To use grids, you should use the new grid template element see Element Definitions
on page 7-5. Grids may only be used in templates that have been enabled with the { UNIT} template macro. It is also important to set the grid-related options see
Setting Options Within the Template: { OPTION}
on page 7-25. The grid support has some important limitations:
1.
The output file format and flavor are expected to supports tables, although this is not required.
2.
Grids are only used when converting spreadsheets and database input files. Grids are not available for word processing files at this time.
3.
Due to size constraints, grid support works best if the contents of the cells in the input file do not make use of a lot of formatting bold, special fonts, text color,
etc..
To further explain the grid system, consider a multi-sheet spreadsheet workbook as an example. Each sheet in the spreadsheet workbook is broken into a collection of grids.
Each grid has a fixed maximum size and is a rectangular portion of the spreadsheet. The size of the grid is specified as a number of spreadsheet cells. For example,
consider the 7 x 10 spreadsheet in
Figure 7–6 .
Figure 7–6 Example 7 X 10 Spreadsheet
If you wanted to break it up into 3 x 4 grids, nine grids would be produced as shown in
Figure 7–7 .
7-50 Administrators Guide for Dynamic Converter
Figure 7–7 Example 7 x 10 Spreadsheet Split Up in 3 X 4 Grids
Normally, all grids have the same number of cells. The exception is that grids at the right or bottom edge of the spreadsheet may be smaller than the normal size. Grids
will never be larger than the requested size. For this reason, grids can easily be navigated by using up, down, left, or right. One thing that grids cannot do is
address individual cells in a spreadsheet except, of course, in the degenerate case of a grid whose size is 1 x 1.
Dynamic Converter does not force deckpage breaks between each grid. Therefore, if the template writer wants to limit each deckpage to only one grid, they should force
the break in the template.
Grid Support When Tables Are Not Available Not all output flavors supported by Dynamic Converter support the creation of tables.
If the output flavor does not support tables, Dynamic Converter will still support grids. However, Dynamic Converters normal non-table output will be what is
presented in grid form. For example, if [A1] represents the contents of cell A1, then we would export the following for a grid of size 2 x 2:
If grids.1.body is: [A1]
[A2] [B1]
[B2]
then grids.right.body is: [C1]
[C2] [D1]
[D2]
and grids.down.body is: [A3]
[A4] [B3]
Script Templates 7-51
[B4]
7-52 Administrators Guide for Dynamic Converter
8
HTML Snippets 8-1
8
HTML Snippets
This section covers the following topics:
■
About HTML Snippets on page 8-1