Macro Language Reference > PIs > Formatting Instructions > @
  
@
Description
Used in conjunction with <@@> to support/format attributes and values within elements/tags. This command defines either the start and end of the attribute value's outer group for a particular attribute, with the characters { } respectively; the attribute name to jump to; or the default if an attribute name is not defined. Each set of single or multiple <@> attribute groups is a wrapper for single or multiple sub attribute value groups using the <@@> command.
 
Example 361. Handle tag attributes via token loops
This example uses token loops instead of the traditional jumps and labels to provide handling for two attributes on a tag.
The setup below supports the tag <tokenloops id="text" att="text"> and some fixed output values with default fallback for `if not defined value' and `if not defined attribute':

<!-- if defined (as showifdef) jump to pseudo labels for :id
and :att -->
<@{>
<!-- if there was an attribute called "id" you will reach here
-->
<!--start id attribute group-->
<@id>
<!-- jump to the values of "id" -->
<!--start id values group-->
<@@{>
<@@chris>id value was <?tic=Blue>chris<?tic=Black>
<@@western>id value was <?tic=Cyan>western<?tic=Black>
<!-- if not a value of (Advent, 3B2) then use the following
-->
<@@*>using (<?tic=orange>default<?tic=Black> for id value
not listed)
<@@}>
<!--end values group-->
<!-- if there was an attribute called "att" you will reach
here -->
<!--start att attribute group-->
<@att>
<!--start att values group-->
<@@{>
<!-- jump to the values of "att" -->
<@@one>att value was <?tic=Magenta>one<?tic=Black>
<@@two>att value was <?tic=Green>two<?tic=Black>
<!-- if not a value of (one,two) then use the following
-->
<@@*>using (<?tic=yellow>default<?tic=Black> for att value
not listed)
<@@}>
<!--end values group-->
<!-- if the any attribute other than 'id' or 'att' appear
you should come here -->
<@*><?tic=red>UNEXPECTED ATTRIBUTE<?tic=Black> attribute
<!-- end of all the attributes and their values -->
<@}>
Syntax
<@ {:L }:L *:L name:s>
{
Open the attribute value sub groups wrapper. e.g. <@{>
}
Close the attribute value sub groups wrapper. e.g. <@}>
*
If an attribute name is not defined or supported in a unique label, e.g. <@attrib1>, default to this action/output.
name
The name of the attribute for which you wish to provide corresponding action/output, e.g. <@attrib2>
Related Links