Format of Meta TagsSyntaxThe 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"
are both valid meta tag syntax. <@ASSIGN
is valid Tango meta tag syntax.
<@CALC EXPR="3+7">
Naming AttributesThe current version of Tango uses attribute names in meta tags. This is a departure from previous versions of Tango that recognized attributes by their position in the meta tag and did not use attribute names. For example, when using the <@POSTARG> tag, previous versions of Tango evaluated the first attribute as the name of the post argument to get, and the second as the type of encoding to perform on the value returned. The tag looked like this, <@POSTARG foo METAHTML>. In Tango 3.0, all attributes have names. <@POSTARG> is now written as, <@POSTARG NAME="foo" ENCODING="METAHTML">, or <@POSTARG ENCODING="METAHTML" NAME="foo">. The order of the attributes does not matter if the attributes are named. 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).
Using the <@POSTARG> example, <@POSTARG homer> is still valid in Tango 3.0, because the NAME attribute is required, and its designated position is first. But, 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 Value LengthThe length of each meta tag attribute value is limited only by available memory. Previous versions of Tango had an attribute value limit of 255 characters. Quoting AttributesAttribute 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).
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:
|
Copyright © 1998, Pervasive Software Inc. All rights reserved.