James,
Is there any way to use the date type and the year appearance to get a 4 digit year in your data, without having to add a hidden row with that calculation?
int(format-date(${q}, "%Y")) worked for me if I added it to a new row in XML as a hidden data type, but not if I included it in the original line of data.