1.3. Data representation formats in CellML

The following data representation formats are defined for use in this specification:

  1. A CellML identifier:

    1. SHALL consist of a single Basic Latin alphabetical character, which MAY be followed by any combination of Basic Latin alphanumerical characters and/or Basic Latin underscores.

    1. SHALL, when comparing two identifiers, be considered identical to another identifier if and only if both identifiers are identical sequences of characters.

See more

Names and identifiers need to be a single word, and without any special characters other than an underscore. For example, these are allowed:

  • myName,

  • my_name,

  • myName1,

… but these are not permitted:

  • my Name has a space,

  • myName! contains a special character, and

  • 1myName starts with a numerical character.

Note that CellML identifiers are case-sensitive, and empty strings are not allowed.

  1. An integer string:

    1. SHALL be a base 10 representation of an integer.

    1. MAY begin with a single Basic Latin plus character U+002B or a single Basic Latin hyphen-minus character U+002D as the sign indicator.

    1. SHALL, other than the sign indicator, consist of one or more digits.

See more

An integer string is simply a string containing only the numerical characters between 0 and 9. If it’s a negative then it should begin with the minus sign, -, if it’s positive it may begin with the plus sign, +.

  1. A basic real number string:

    1. SHALL be a base 10 representation of a real number.

    1. MAY begin with a single Basic Latin plus character U+002B or a single Basic Latin hyphen-minus character U+002D as the sign indicator.

    1. MAY contain a single decimal point separator, which SHALL be the Basic Latin full stop character U+002E.

    1. SHALL, other than the sign indicator and the decimal point separator, consist of one or more digits.

See more

Note that the basic real number string is distinct from the real number string in that it does not include real numbers in scientific notation (also called scientific form, standard index form, or standard form).

For example:

  • "-123.4567" is a valid basic real number string,

  • "-1.234567E03" is not (but it is a valid real number string),

  • "+123.4567" is not valid (must not contain the plus sign +),

  • "1234567" is valid (it’s ok to not use a decimal point .),

  • "123,4567" is not valid (the decimal signifier must be a full-stop symbol .),

  • "123,456.7" is not valid (you may not use a comma , or a space :code:` ` as a thousands separator),

  • "12.34.56" is not valid (maximum of one decimal point . is permitted), and

  • "0x123abc" is not valid (base 10 numbers only).

  1. A real number string:

    1. SHALL be a base 10 representation of a real number \(r=s \times 10^e\) where \(s\) is the significand, a real number, and \(e\) is the exponent, an integer.

    1. The representation of the number SHALL be the representation of the significand, optionally followed by a representation of the exponent.

    1. The significand SHALL be represented as a basic real number string.

    1. An exponent SHALL be represented by an exponent separator character, followed by the integer string representation of the value of the exponent. The exponent separator character SHALL be either the Basic Latin “E” character U+0045 or the Basic Latin “e” character U+0065.

    1. If the exponent representation is omitted, the exponent shall be zero.

See more

Note that the real number string is distinct from the basic real number string in that it includes numbers in scientific notation (also called scientific form, standard index form, or standard form).

Where it does not contain an exponent term, the number is interpreted as if it was a basic real number string: the exponent term is effectively zero.

For example:

  • "1.234E03" is a valid real number string,

  • "+1.234E03" is not valid (must not contain the plus sign + in the significand),

  • "1.234E+03" is valid (a plus sign + sign is permitted in the exponent),

  • "1.234E+3.0" is not valid (the exponent must be an integer),

  • "1.234e3" is valid (either case of E or e is permitted),

  • "123,45E03" is not valid (the decimal signifier must be a full-stop symbol .),

  • "123.45" is valid, and is treated as if it were a basic real number string: the exponent term is effectivly zero,

  • "123.45E" is not valid (if the exponent is present it may not be blank),

  • "123,456.7e89" is not valid (you may not use a thousands separator), and

  • "0x123abc" is not valid (base 10 numbers only).