Home Forums XMetaL Tips and Tricks Script Example: Sort Lowercase CALS Tables (DITA, DocBook, etc) Reply To: Script Example: Sort Lowercase CALS Tables (DITA, DocBook, etc)

Derek Read

Reply to: Script Example: Sort Lowercase CALS Tables (DITA, DocBook, etc)

Here's a quick fix to stop the from being removed when the table contains entities.

It doesn't actually fix the issue (I'll let dcramer see if he can work that out), but at least this will tell you the table couldn't be sorted and stops it from disappearing in the case of entities and possibly other cases:

Old
[code] rngWork.TypeText(sortedTable);[/code]

New
[code] if (sortedTable > “”) {
rngWork.TypeText(sortedTable);
}
else {
Application.Alert(“This script is not smart enough to sort your table.”);
}[/code]

Reply

Products
Downloads
Support