GENERATION OF EXPORT TEMPLATES

Templates are files in HTML format that can contain text, images or links commonly found in HTML documents so they can be generated within any HTML editor such as FrontPage® or Dreamweaver®.

What is particular to the templates is that they contain specific keys inside HTML comments (which are never visible to browsers) that allow the program to interpret them and substitute them for the indicated metadata. There is a key for almost every one of the different entries of the metadata and relations file so that the user can use these keys to precisely indicate what information they wish to show.

The program reads the template and substitutes the keys for the information requested (taken from the metadata of the layer under consideration), thus generating a totally standard HTML document that may be used, for example, in a map web page or server as an export system for other users or as an alternative to XML.

To ease the use of this function the following templates are provided (located in the "Plantill" directory of the MiraMon installation directory):

For more information on the specific key consult Glossary of commands for generating metadata templates.

TYPE AND SYNTAX OF SPECIFIC KEYS

The keys can be grouped in different types:

ReadClauText
STB
SiNoBuida
Treatment of repeated keys

ReadClauText

This key is used to show a metadata or relations entry. The syntax is as follows:

<!-- ##ReadClauText:???## --> where ??? is any of the keys of the Glossary indicated in the ReadClauText sections.

Example: If we write, <!-- ##ReadClauText:IDENTIFICATION:DatasetTitle## --> the result that we obtain, if the entry contains information, will be the database title: "Modelo Digital de Elevaciones de Europa".

STB

This key is used to show fixed titles or names of the information to be shown. The syntax is as follows:

<!-- ##STB:???## --> where ??? is any GeM+ or general stb descriptor. A list of stb descriptors that can be used can be obtained by openning GeM+.stb or general.stb (in the MiraMon directory) using the text editor.

To show the text in capitals the parameter MAJ must be added as shown:

<!-- ##STB:MAJ:???## -->

Example: If we write, <!-- ##STB:FitxerMetadades## --> the result that will be: "Metadata file". And if we write:
<!-- ##STB:MAJ:FitxerMetadades## --> the result will be: "METADATA FILE".

SiNoBuida

This key is used to show specific parts of the template if an entry is empty or not applied. In this way, if the value of the entry is empty everything between the SiNoBuida keys will not be shown. The syntax is as follows:

<!-- ##SiNoBuida:???## --> and <!-- ##FiSiNoBuida## --> where ??? is any of the keys of the Glossary indicated in the ReadClauText and SiNoBuida section.

Between the key <!-- ##SiNoBuida:???## --> and the key <!-- ##FiSiNoBuida## --> can be put as many of the keys <!-- ##STB:???## --> and <!-- ##ReadClauText:???## --> as we like as well as HTML text and keys.

The commands <!-- ##SiNoBuida:???## --> and <!-- ##FiSiNoBuida## --> can be nested, with the only restriction that on the same line of the template there cannot be more than one <!-- ##SiNoBuida:???## --> and one <!-- ##FiSiNoBuida## -->.

Example: If in the template there is:

<!-- ##SiNoBuida:IDENTIFICATION:DatasetTitle## -->
<i><!-- ##STB:T_DatasetTitle## -->:</i>
<!-- ##ReadClauText:IDENTIFICATION:DatasetTitle## --><BR>
<!-- ##FiSiNoBuida## -->

there will be a check to see whether the key IDENTIFICATION:DatasetTitle contains some information and if there is then everything will be displayed between the key SiNoBuida and the key FiSiNoBuida, which in this case will be:

Dataset title: Europe Digital Elevation Model

Treatment of repeated keys

Some metadata entries allow N type cardinality, that is more than one value for that type of metadata. For example it is possible to define one or more alternative titles for the same database or a single database table can have more than one field that must be described.

For this reason it is necessary to define in the templates how to show ONE of these elements and the program repeats this structure as many times as necessary to show all the values of the metadata entry. There exist specific commands that allow the definition of the beginning and the end of the HTML code for showing each of the elements (see the section "Claves para Repeticiones" of the Glossary of commands).

Example: For the case of alternative titles (Identification section) the keys for repetitions are:

<!-- ##IDENTIFICATION:TITOLSALTERNATIUS## --> <!-- ##FiIDENTIFICATION:TITOLSALTERNATIUS## -->

such that the HTML code of the template could be:

<HR><DL><i><!-- ##STB:T_TitolAlternatiu## -->:</i>
<!-- ##IDENTIFICATION:TITOLSALTERNATIUS## -->
<DD><!-- ##ReadClauText:IDENTIFICATION:AlternateTitle## -->
<!-- ##FiIDENTIFICATION:TITOLSALTERNATIUS## -->
</DL><HR>

and this will generate the HTML code:

<HR><DL><i>Alternative title:</i>
<DD>IEFC
<DD>Forest Inventory
</DL><HR>


which will be displayed as:


Alternative title:
IEFC
Forest Inventory

Note that the text "Alternative title" (obtained from the STB command) is outside the commands for the start and end of the repeated keys and for this reason it is contained in the result only once. If the HTML code had been:

<HR>
<!-- ##IDENTIFICATION:TITOLSALTERNATIUS## -->
<B><!-- ##STB:T_TitolAlternatiu## -->:</B>
<!-- ##ReadClauText:IDENTIFICATION:AlternateTitle## --><br>
<!-- ##FiIDENTIFICATION:TITOLSALTERNATIUS## -->
<HR>

the HTML metadata file would have looked like:


Alternative title: IEFC
Alternative title: Forest Inventory