The functions named in this section are all used at compile-time by the translator. At that moment, they will be placed in the kind-of opcode tree which will process the data at run-time. You cannot call these functions yourself.

XML::Compile will automatically format the value for you. For instance, a float supplied to a field defined as type Integer will be converted to an integer. Data supplied to a field of type base64Binary will be encoded as Base64 for you: you shouldn't do the conversion yourself, you'll get double encoding!

Schema's define integer types which are derived from the decimal type. These values can grow enormously large, and therefore can only be handled correctly using Math::BigInt. When the translator is built with the sloppy_integers option, this will simplify (speed-up) the produced code considerably: all integers then shall be between -2G and +2G.

A day, represented in localtime as YYYY-MM-DD or YYYY-MM-DD[-+]HH:mm. When a decimal value is passed, it is interpreted as time value in UTC, and will be formatted as required. When reading, the date string will not be parsed.

A moment, represented as "date T time tz?", where date is YYYY-MM-DD, time is HH:MM:SS, and the time-zone tz is either -HH:mm, +HH:mm, or Z for UTC. The time-zone is optional, but can better be used because the default is not defined in the standard. For that reason, the dateTimeStamp got introduced, which requires the timezone.

When a decimal value is passed, it is interpreted as time value in UTC, and will be formatted as required. This will not work when the dateTime extended type has facet explicitTimeZome="prohibited".

When reading, the date string will not be parsed. Parsing timestamps is quite expensive, therefore not preformed automatically. You may try Time::Local in combination with Date::Parse, or Time::Piece::ISO. Be very careful with the timezone settings in your program, which effects mktime which is used by these implementations. Best to run your application in GMT/UTC/UCT/Z.

A qualified type name: a type name with optional prefix. The prefix notation prefix:type will be translated into the {$ns}type notation.

For writers, this translation can only happen when the $ns is also in use on some other place in the message: the name-space declaration can not be added at run-time. In other cases, you will get a run-time error. Play with XML::Compile::Schema::compile(prefixes), predefining evenything what may be used, setting the used count to 1.