Difference between revisions of "Parameterfile1"

From Linear Mixed Models Toolbox
Jump to navigation Jump to search
Line 15: Line 15:
=== Tag names ===
=== Tag names ===


The tag names is the character string between the arrow brackets of a tag. For example, the tag name of {{cc|<hello>}} is {{cc|hello}}. Depending on the specific location and function of a tag the name can be hard-coded or user-defined(u.d.). U.d. tag names can be as short as possible. e.g. a single character, but must not contain any white space. While a tag name my contain any [https://en.wikipedia.org/wiki/ASCII ascii] character it is strongly recommended to use only [https://en.wikipedia.org/wiki/Alphanumeric alpha-numeric] characters and underscores.
The tag name is the character string between the arrow brackets of a tag. For example, the tag name of {{cc|<hello>}} is {{cc|hello}}. Depending on the specific location and function of a tag the name can be hard-coded or user-defined(u.d.). U.d. tag names can be as short as possible. e.g. a single character, but must not contain any white space. While a tag name my contain any [https://en.wikipedia.org/wiki/ASCII ascii] character it is strongly recommended to use only [https://en.wikipedia.org/wiki/Alphanumeric alpha-numeric] characters and underscores.


=== Key strings ===
=== Key strings ===

Revision as of 03:58, 26 December 2020

The lmt parameter file must in written in “eXtensible Markeup Language” (xml). For under- standing the examples you may want to get a jump start in xml file structure first. Don’t be scared. Even without any previous knowledge you’ll be able to understand the xml structure used for lmt in less then half an hour. Please consult the Internet to find suitable introduction into xml. Bare in mind that the lmt parameter file is case sensitive, that is Hello is not the same as hello.

Unsupported xml features

Currently unsupported xml features are character entities and complete empty-element tags. Further, start tags and end tags must not occur in the same line of the parameter file.

Parameter file terminology

The lmt parameter file has only two major structural components: tags and key strings. The content of each tag can be another tag or a key string.

Tag names

The tag name is the character string between the arrow brackets of a tag. For example, the tag name of <hello> is hello . Depending on the specific location and function of a tag the name can be hard-coded or user-defined(u.d.). U.d. tag names can be as short as possible. e.g. a single character, but must not contain any white space. While a tag name my contain any ascii character it is strongly recommended to use only alpha-numeric characters and underscores.

Key strings

Key strings have always the format keyword:variable . Keyword is a character string which is either hard coded or user defined. The spelling is therefore defined by the hardcoded value, or by the user, must be abide by. Variable refers to a character string or comma-separated list of strings which may be hardcoded or user-defined, or a single or a comma-separated list of numeric values.

Parsing logic

lmt parse the parameter file starting at the compulsory <root> tag. Nested tags can be either automatic-compulsory, automatic-optional and nominated. Automatic-optional tags will be searched for by default and are evaluated if they are present. Their absence will not case an error message at parsing time. However, that does not mean that the information they should provide is not necessary later on and it's absence may cause an error stop. Automatic-compulsory tags will be search for by default and their absence will cause an error stop. Nominated tags are always compulsory but are only searched for if they have been nominated by a key string variable, where the key string variable becomes the tag name.

Depending on the host tag key strings can be optional or compulsory.

<root>
  <nest_1>
  </nest_1>
  <nest_2>
    <x>
    </x>
    others: y,z
    <y>
    </y>
    <z>
    </z>
  </nest_2>
</root>

In the above example nested tags <nest_1> and <nest_2> maybe optional or compulsory, but both are automatic, that is lmt will evaluate them only if the are present. Tag <x> , nested in tag <nest_2> , is automatic and may be optional or compulsory as well. However, tags <y> and <z> are nominated and therefore compulsory. The nomination is triggered by providing key string other: y,z where the variable y,z provides a comma-separated list of names of the nominated tags. That is, after evaluating key string others: y,z lmt will search for tags <y> and <z> , and their absence will cause an error stop.