hsc

Macro/tag attributes

Attributes are compareable to function arguments in programming languages like Pascal, Oberon or E. So attributes are arguments passed to a tag or macro.

Additionally, you can create/update attributes using <$LET>.

Within <$MACRO>, <$LET> and <$DEFTAG>, an attribute is defined with

name ":" type [ "=" default value ] [ "/" flag ]
Legal attribute types are:
STRING
any text
URI
references to an URI. Is affected bye command line options like CheckUri.
BOOL
boolean flag
ENUM
enumerator type; accepts only given values (eg the ALIGN attribute of <IMG>).
A default value initialises the attribute every time the macro is called. If the attribute is not set within the macro call, the default value stays active. Otherwise, the value passed to the macro will be used as new value.

Legal flags are:

JERK (short: J)
attribute is only used by jerks
REQUIRED (short: R)
attribute must be set when macro/tag is called
NOQUOTE (short: Q)
value doesn't require quotes; mostly used for jerk attributes. To globaly disable warnings about missing quotes, use IGNORE=22 when envoking hsc.

Examples

DO_IT:bool
defines a boolean attribute
UP:uri=":main.html"
defines an URI attribute and sets it's default value to ":main.html". The ":" indicates that the default value is an absolute URI.
MODE:enum(ascii|bin|hex)
defines an enumerator type; legal values are ascii, bin and hex.

MAIN COPY


Thomas Aglassinger ( agi@sbox.tu-graz.ac.at ), 21-Dec-1995