Attributes are comparable 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 <$define>
and <$let>
therefor using them like variables.
<$macro>
, <$define>
and <$deftag>
,
an attribute is declared using
name ":" type [ "/" modifiers ] [ "=" default value ]
STRING
URI
BOOL
ENUM
ALIGN
attribute of <IMG>
).
ID
<A HREF="#id">
NUM
COLOR
"#rrggbb"
or one of the values defined using
HSC.COLOR-NAMES
.
/CONST
(short: /C
)
<$let>
.
This option is only allowed within <$define>
/GLOBAL
(short: /G
)
<$define>
.
/JERK
(short: /J
)
/REQUIRED
(short: /R
)
<$macro>
and <$deftag>
, URIs also can have the following options:
/SIZE
(short: /Z
)
WIDTH
and HEIGHT
within the same tag
and set them with these values (if they have not been set before).
At they moment, only tags like <IMG>
support this.
/STRIPEXT
(short: /X
)
The default value initialises the attribute every time the macro is called. If the attribute is not set within the macro call, the default value is used. Otherwise, the value passed to the macro will be used as new value.
DO_IT:bool
UP:uri=":main.html"
:main.html
".
The ":" indicates that the default value is an absolute URI.
MODE:enum("ascii|bin|hex")
ascii
,
bin
and hex
.