![]() |
VTML Tag Definitions: Documentation |
|
Once the site at the new server is ready, this message will automatically disappear!
Meanwhile, you can see how the move is progressing at the status page.
Introduction |
This page contains some documentation about layout and behavior of my VTML Tag Definitions: how to use them and what (not) to expect from them. It will also explain why certain decisions were taken (like omitting input fields for LFWIDTH and LFHEIGHT). The current version number and date are mentioned with each description. There is now also a separate page with a release history of these tag editors. What this page does not do is explain is the techniques that were used to accomplish what they do: That sort of information is to be found in the Tips and Techniques section; where appropriate examples from these tag editors will be used. One general user interface aspect of the VTML Tag Editors should be mentioned here rather than repeated
everywhere: While it is not (yet) possible to mark an attribute as required in the VTML for the tag that
uses that attribute, and pop up an error message when a required attribute is omitted, I found a half-way
solution. Every attribute that is required is simply marked with an asterisk:
|
|
MarkUpTags |
The updated version of MarkUpTags.vtm: the file that controls the tag chooser) that comes with this set of visual tag editors now completely exploits the techniques I had introduced for the VTML section only with the first release of my VTML tag editors. Some important differences with the previous version released by Allaire:
The last two points illustrate an important user interface design consideration: recognition is easier than recall. For instance, if you use the same tags over and over from the tag chooser, eventually you'll probably know (recall) which ones have an editor and which ones are inserted directly. But if the user interface can simply remind you of that fact (recognition) it'll be easier on your memory: you can use your brains to concentrate on the content rather than trying to remember which tag has an editor and which one doesn't. (Read more about this and other techniques for the MarkUpTags.vtm file in the Tips and Techniques: Tag Chooser page.) This technique for showing which tags have an editor and which ones don't is now used throughout this MarkUpTags.vtm file. A section for SMIL tags has been included to ensure compatibility with HomeSite 4.0 and ColdFusion Studio 4.0; visual support for the difference between directly inserted tags and those that are supported by a tag editor has been added here as well to keep this consistent with the other sections. (Note that HS3.01/CFS3.11 do not include the tag editors for SMIL.) |
|
<TAG> |
This is one of the simplest tag editors. BODYEDITING is now treated as a flag; code which uses "Yes" or "No" attribute values is recognized by the Tag Editor but Tag Inspector does not handle this correctly. Edit old code with the Tag Editor before using Tag Inspector. |
|
<EDITORLAYOUT> |
Some important differences with the original Allaire release:
|
|
<CONTAINER> |
Important differences with the original Allaire release:
|
|
<CONTROL> |
Everything already mentioned for LFWIDTH and LFHEIGHT with CONTAINER also holds here. The same is true for not quoting numerical values. There are a few special aspects to mention about the CONTROL editor though:
|
|
<ITEM> |
Important differences with the original Allaire release:
|
|
<ATTRIB> |
Important differences with the original Allaire release:
|
|
<ATTRIBOPTION> |
The Tag Editor generates VTML 2 syntax. |
|
<EVENT> |
|
|
<ATTRIBCATEGORIES> |
The Tag Editor generates VTML 2 syntax. |
|
<ATTRIBGROUP> |
The Tag Editor generates VTML 2 syntax. |
|
<TAGLAYOUT> |
The TAGLAYOUT editor is quite simple. There is only one attribute: SECTION. This attribute will not be written if the chosen value is "StartTag" since this is the default. This value is also selected by default. |
|
<TAGDESCRIPTION> |
Not much to report here except it tries a little harder than the Allaire original to get the layout correct when you don't enter a helpfile but enter a tag body instead. Note: You can write the tag body using markup tags, and they will be written. However, these get lost (at least in HomeSite 3.01 / ColdFusion Studio 3.11) when reading the tag for editing due to how the WIZML parser works.
|
|
<WIZARD> |
|
|
<PARAM> |
With this tag I ran into an interesting problem: HTML has a PARAM tag, used with the APPLET tag and in HTML 4.0 with the OBJECT tag. In VTML 2, PARAM can be used in combination with the WIZARD tag and with the PAGE tag. In all four cases, the set of possible attributes is somewhat different although there is an overlap; and for Wizards the VALUE attribute is required while it isn't for Applets and Objects. Originally I set out to simply make a different tag definition for HTML and Wizard VTML. But both must be PARAM.VTM. With HomeSite 3.01 and ColdFusion 3.11 the problem was immediately obvious: all tag definitions must be in the same directory and you can't have two of the same name; a different name for one would allow inserting a new attribute using a different definition - but not editing an existing tag. For HomeSite 4.0 and ColdFusion 4.0 there seemed to be a solution: tag definitions are sorted into different subfolders; but no, these programs use a searching algorithm to find a tag definition: while different ones of the same name are possible, only one will ever be used: the one the searching algorithm finds first. And (for now) tag definitions are cached, so you cannot dynamically change what would be found by renaming a folder or tag definition. What you'll find here is the workaround I came up with: a single tag definition that includes the functionality both for use with HTML (for APPLET and OBJECT) as well as for use with Wizard VTML (for WIZARD and PAGE). Here's how it works:
You should always make sure you're using the correct tabs when writing a tag with the Tag Editor; differences in behavior include writing VTML 2 syntax for VTML and treatment of required and optional attributes.
|
|
<TEMPLATE> |
The Tag Editor generates VTML 2 syntax which should be supported in HomeSite / ColdFusion Studio 4.0 although the Wizards released with these products do not (yet) use it. |
|
<PAGE> |
For a Tag Editor, the attribute TYPE="Dynamic" which is required for user-defined Wizards, is treated as un uneditable required attribute. For Tag Inspector this is documented by using an enumerated type with just one value and an appropriate caption. |
|
<INPUT> |
You should always make sure you're using the correct tabs when writing a tag with the Tag Editor; differences in behavior include writing VTML 2 syntax for VTML and treatment of required and optional attributes.
|
|
<NEXTPAGE> |
|
|
<WIZIF> |
WIZIF takes only one argument: a condition. Alas, an argument is not the same thing as an attribute which can always be recognized by a keyword. This implies that it is (currently) impossible for a tag editor to read and display the condition in a WIZIF (or WIZELSEIF) statement. (Believe me, I tried - hard!) But when I started out with VTML (WIZML in this case) I had trouble remembering how to write the comparison operators. So again on the principle that recognition is better than recall, I created a write-only tag editor with a simple condition builder. At least that will remember the comparison operators for you, and it makes a reasonable stab at creating syntactically correct conditions with brackets where appropriate. If you edit a WIZIF tag with it, you will have to re-build the expression (which may actually turn out to be better than editing one). |
|
<WIZELSEIF> |
Essentially the same as the WIZIF editor; it only writes a different tag. |
|
<WIZLOOP> |
WIZLOOP is a little easier than WIZIF/WIZELSEIF since it does have real attributes that can be recognized and displayed in the editor. One problem remains: there are three types of WIZLOOP (at least I'm supporting three types) but the type is not indicated by an attribute. I've chosen to have a tab page for each type, but when editing a WIZLOOP tag, the tab page will not (cannot) be selected automatically. The tab for a conditional loop contains a condition builder like the one for WIZIF and WIZELSEIF. But there's a difference: in WIZLOOP the condition is indicated by a keyword so while editing the tag the current expression can be displayed as a string. (Of course it cannot be parsed into the separate pieces in the condition builder.) Now you have the choice: either you edit the current condition as a string, or you use the condition builder to create a new one. If you do both, the editor remembers the condition string as it was before you edited it, and uses the fact it was changed to give precedence to the edited condition rather than the input in the condition builder. It's a straight string comparison, so if you edit and end end up with the same string, the tag editor should not notice any change. |
|
<WIZINCLUDE> |
In HomeSite 3.01 and ColdFusion Studio 3.11 the statement WIZINCLUDE worked only in Wizards (which were not user-definable anyway), not in Visual Tag Editors (alas). For HomeSite / ColdFusion Studio 4.0 we can now define our own Wizards so WIZINCLUDE now has a real function. However, this still does not work inside the context of a Tag Editor. |