Missing or superfluous End commands
When a template is run, XpressDox will check for missing and floating End commands as well as floating Else commands.
Wherever possible, the error message warning about one of these situations will give some context within the document where the relevant command is, so that you can find it easily and correct the situation.
But sometimes it’s not possible for XpressDox to provide a context. When this happens, XpressDox will recommend that you use the
<<Debug()>> command somewhere (preferably right at the top) in the template. The Debug command will highlight any floating or missing End or Else commands in the template in the text of the merged document.
When there is a Debug command in a template, XpressDox places a warning at the top of the merged document, warning about the presence of the Debug command, so once there are no more floating commands, the Debug command should be removed.
Sometimes during the merging of a template the XSLT engine encounters a syntax error and issues a message looking something like “Expected token, found ‘.'” or “Unexpected token”. The trouble is that the message gives no context whatsoever and so trouble shooting is very difficult.
The Debug command will cause XpressDox to analyse every fillpoint for these kinds of syntax issues. If it finds such an issue it will include with the XSLT error message the fillpoint in which the error occurred. The reason for making this analysis depend on the Debug command is that in general it is quite time consuming.
The XSLT error feature is available in version 5.2 and later.