Google Search diml.org
[ french ]

Table des matières
 Latest News
 An application of the  WCT_NEWS  component
>> Top of page

Sata Injection Markup Language Reference

Calls To A Local Scalar Reference


Module : Core Group : Variables Call
<%%variable 
   [DEFAULT="default-value" 
   NULL="null-value" 
   FORMAT="format-string" 
   MAXLENGTH=size
   MINLENGTH=size] %%>

Any template or DIML variable can be "injected" at any place in a document or in any DIML sequence. Resolution of such a call is a string that will be called the counterpart of the DIML statement. After reference resolution has been achieved, the equivalent value can be postformatted to achieve the effective final value of the scalar call:

DEFAULT: If the variable reference is not known in the DIML interface array, the default value is the empty string, unless the DEFAULT attribute is defined.

NULL: If the reference exists, but the variable is "undefides" or defined to the meta variable %NULL%, the returned value is the empty string unless the NULL attribute is defined.

FORMAT: Formats the variable content conforming to the specified format descriptor. This attribute IS NOT implemented in the current version of the processor.

MAXLENGTH: If the final value is longer than MAXLENGTH characters, the resulting strig is trimmed to have an exactly MAXLENGTH chars length.

MINLENGTH: If the final value is shorter than MINLENGTH characters, then a sufficient number of "space" chars are added to fill the string to exactly MINLENGTH characters. The visual resulting length is only approximative, because is strongly depenent of how the user agent deals with charset, font metrics, and padding chars interpretation. When the output mime-type is text/plain, spaces (char 0x20) will be added. When the output mime-type is text/html, an "&emsp" sequence should be added as a single padding char.


previous summary next


All material is copyleft V.G. FREMAUX (EISTI France) 1999 to 2003 except explicitly mentioned