BTL Syntax

FrontPage component templates and instances stored in BTL are legal HTML comments. They begin with the string <!--WEBBOT and end with the string -->. No white space is allowed between the opening <!-- and WEBBOT, which must be all upper-case. There must be at least one white space character before the closing -->. HTML allows white space between the final -- and the >, but BTL does not.

Between the delimiters are one or more space-separated attributes, which have essentially the same syntax as the attributes of an HTML tag. The attributes are name-value pairs with an equal sign between the name and the value. White space is allowed around the equal sign. The name begins with a letter and is followed by up to 71 letters, digits, periods, or hyphens. The name is case-insensitive. The value may be either a string literal enclosed in double quotes or a name token (with a leading digit allowed). Some attributes may consist of a name only with the equal sign and value omitted.

String literals may not contain a double-quote, ampersand, or greater-than character, but they may include new-lines. To include a quote, ampersand, or greater-than character in a string literal, escape it using HTML syntax: For example:

"You must escape the &quot; &amp; and &gt; characters"

The first attribute of a component must be BOT=shortname. The shortname may be written in mixed case for readability, but it is case insensitive; MACRO, Macro, and macro refer to the same type of component.

Repeated attributes with the same name but different values are allowed; this is how components store arrays of values. For example:

<--WEBBOT BOT=ClickImage RECT="10,10,50,20" RECT="10,30,50,20" -->

Components are not allowed inside an HTML tag (for example, as the value of an HREF attribute), but otherwise components are allowed anywhere in the HTML stream that the text returned by the component evaluate method would be allowed.

HTML comments (and thus components) do not generate any white space when processed. Thus:

some<!--WEBBOT BOT=NoOpBot -->thing

will be displayed as something by the editor or a browser.