XpressDox gives quite a lot of power to template authors in controlling the layout of the interview for a template.
For example, the layout commands for an email address might look something like this:
<<Caption(EmailAddress,Email address for correspondence)?Enter the email address or choose one from the list.>><<ChooseFromSamples(EmailAddress,,email@example.com,firstname.lastname@example.org,email@example.com)>><<Heading(EmailAddress,|^b^@Navy@CONTACT INFORMATION)>>
<<Rule(EmailAddress,hard,IsEmailAddress,'The value is not a valid email address, please check and correct')>><<Tab(Contact Information,EmailAddress)>>
The Define command enables the template author to combine all of these commands (and also the Footing information) into one command. The above set of commands would then be included in a Define command as follows:
<<Define(EmailAddress,Email address for correspondence,|^b^@Navy@CONTACT INFORMATION,,Contact Information,ChooseFromSamples,;firstname.lastname@example.org;email@example.com;firstname.lastname@example.org,Required,email@example.com,hard;IsEmailAddress;The value is not a valid email address!, please check and correct)?Enter the email address or choose one from the list>>
- The Footing definition appears between the Heading and the Tab caption, and in this case because the Footing is empty, there are two commas immediately after the Heading text.
- The Rule definition appears just as it would in the Rule command, but that the parameters to the Rule command are separated by semi-colons in the Define command. This is also true of the values which will appear in the drop-down list.
Note also that the Define command does NOT cause the value of the data element being defined to appear in the merged document. In this respect its behaviour is exactly the same as for the various commands that it replaces.
In addition, if no fillpoint appears in the template which would result in the value of the data element appearing in the merged document, then the data element will not appear in the interview. This is by design as it means that, for example, for a suite of templates, all the Define commands can be placed in a layout template which is included into every other template in the suite. Then only those data elements that actually appear in a given merged document will appear on the interview for the template concerned.
The Command Editor contains a wizard which helps define all the parameters to the Define command, so it’s not necessary to remember the rather complex syntax and type the command in manually.