generateCrossrefXml move logic from __main__ to a function.
Typo in variable name.