Use Google to find help fast. For example, search on "xpressdox choosefromlist".

Using block commands in XpressDox

Using block commands in XpressDox

The ForEach and If commands are called ‘block commands’ because they are terminated with a separate End command. Between the start and end of the block there are other fillpoints. There is a special behaviour related to block commands to help with eliminating unwanted empty paragraphs when the start and end appear on different paragraphs. The rule can be stated as such:

When the block start Fillpoint and matching block end Fillpoint appear on different paragraphs, then:
a. If there is no text after the block start fillpoint on the paragraph on which it appears, then that paragraph will not be included in the output.
b. If there is no text before the block end fillpoint on the paragraph on which it appears, then that paragraph will not be included in the output.

The above rules have been relaxed somewhat in version 4 and later of XpressDox. As long as the text before the start fillpoint and after the end fillpoint does not contain other block commands, XpressDox does its best to include the text into the correct place in the document.

Other examples:
i) <<ForEach(party)>>The <<Ordinal()>> party is <<firstname surname>>.<<End(ForEach party)>>

This will look like:

The First party is Fred Basset.The Second party is Harry Smith.The Third party is Ivan Bosman.The Fourth party is Maximilian Jones.The Fifth party is Johan Smit.The Sixth party is William Wilberforce.The Subsequent party is Mortimer Rodent.The Subsequent party is Petrus du Toit.

The Ordinal Command will show you how to correctly number parties after the sixth one.

ii) <<If(Date = ‘2008/04/17’)>><<ForEach(party)>>The <<Ordinal()>> party is <<firstname surname>>.
<<End(ForEach party)>><<End( if date)>>

A message will be given that the If command should be in its own paragraph. The way to code this is:

<<If(Date = ‘2008/04/17’)>>
<<ForEach(party)>>
The <<(Ordinal()>> party is <<firstname surname>>.
<<End(ForEach party)>>
<<End( if date)>>

The block rules will ensure that the first and last two paragraphs in the above sequence will not be included in the output, which is probably what is required.

Leave a Reply