Format Section


NameTypeDescription
languagelangidlanguage to use for formatting
falsestringvalue for representing false
truestringvalue for representing true
minussignbooltrue means format negative numbers with minus sign
zerosignbooltrue means format zero with either plus or minus sign
plussignbooltrue means format positive numbers with plus sign
baseintbase for formatting integers (2-36)
digitsintsets both mindigits and maxdigits
mindigitsintminimum number of digits for integers
maxdigitsintmaximum number of digits for integers
decimalsintsets both mindecimals and maxdecimals
mindecimalsintminimum number of decimal places for reals and numerics
maxdecimalsintmaximum number of decimal places for reals and numerics
maxsigdigsintmaximum number of significant digits for reals
maxdivisorintmaximum value of denominator for fractions
timezonetzabbrabbreviation for timezone
timestampformatformatting string for timestamps
dateformatformatting string for dates
timeformatformatting string for times
casekeywordcase transform
nobreakbooltrue means make spaces and hyphens non-breaking
eolstringend of line replacement
escapekeywordtextual transforms
widthintsets both minwidth and maxwidth
minwidthintminimum width of string
maxwidthintmaximum width of string
alignalignalignment of text (left, right)
padcharcharcharacter to pad text with
prefixstringtext to be encoded and prepended to non-null data
suffixstringtext to be encoded and appended to non-null data
encodekeywordoutput translation
beforestringraw text to be prepended to non-null data
afterstringraw text to be appended to non-null data
ifnullstringvalue for representing null data

An example format section (possibly with superfluous entries) could be:

<format> <ifnull>?</ifnull> <language>english</language> <false>Wrong!</false> <true>Correct</true> <base>10</base> <mindigits>1</mindigits> <maxdigits>4</maxdigits> <mindecimals>3</mindecimals> <maxdecimals>6</maxdecimals> <maxdivisor>16</maxdivisor> <date>MMMM d, yyyy</date> <time>hh:mm:ss</time> <timestamp>MMMM d, yyyy hh:mm:ss</timestamp> <case>none</case> <output>html</output> </format>