The basic syntax for Tango meta tags is:
<@TAG ATTRIBUTENAME="ATTRIBUTEVALUE">
At least one space must occur between the tag name and the first attribute name, and between all attribute values and subsequent attribute names. For example:
<@POSTARG NAME="Bruce" ENCODING="NONE">
<@POSTARG NAME="Bruce"
ENCODING="NONE">
are both valid meta tag syntax.
<@ASSIGN
NAME="varname"
SCOPE="local"
VALUE="somevalue"
>
is valid Tango meta tag syntax.
<@CALC EXPR="3+7">
<@Calc expr="3+7">
<@calc Expr="3+7">
Tango uses attribute names in meta tags. All attributes have names. The order of the attributes does not matter if the attributes are named; for example, <@POSTARG NAME="foo" ENCODING="METAHTML">, and <@POSTARG ENCODING="METAHTML" NAME="foo"> are equivalent.
The name for every attribute you specify must be provided, with one exception: any attribute that is required--that is, any attribute whose absence makes a meta tag invalid--can be specified without a name, as long as it occurs in its predefined position (usually immediately following the name of the meta tag).
Note: The documentation in
this chapter shows meta tag syntax with the required order for positional
(required) attributes.
<@POSTARG homer> is valid in Tango, because the NAME attribute is required, and its designated position is first. If you want to specify the encoding, you must use <@POSTARG homer ENCODING="NONE">, because ENCODING is not a required attribute. For new users of Tango, the best method to adopt is to enter all attribute names, for example, <@POSTARG NAME="homer" ENCODING="NONE">.
Attribute values must sometimes be quoted to avoid ambiguity. For example, whenever you need to specify an attribute value that includes a space, you must put quotes around it. To refer to a database column called "Zip Code", for example, use <@COLUMN NAME="Zip Code">. Without the quotes, Tango would incorrectly interpret Zip as the attribute name and Code as the start of another attribute. Tango recognizes both the double (") and single (') quote character pairs as attribute delimiters.
Another case where quotes are necessary is when specifying an empty value for the attribute ("" tells Tango that there is no value).
Note: Quotes are not necessary
when you are using only a meta tag as the attribute value. Tango knows that
meta tags begin with <@ and end with >, so no quotes
are necessary to delimit the value.
In general, quoting attribute values is recommended. It is never incorrect to quote an attribute value.
Some additional rules to follow when quoting meta tag attributes are as follows:
For more information, see <@CALC> and <@IF>, <@ELSEIF>, <@ELSEIFEMPTY>, <@ELSEIFEQUAL>, </@IF>.
Copyright © 1999, Pervasive Software. All rights reserved.