Joost, thanks for spotting the missing > and for your advice.
I was still getting the same error after fixing that, though.
I found the cause. It works fine as long as the input.xml filename and input.xsl filename do *not* have a path in front of them. I am on a Windows platform and have tried the formats:
'C:/mypath/input.xml'
'C:\mypath\input.xml'
"C:/mypath/input.xml"
"C:\\mypath\\input.xml"
It seems it can only accept files in the current directory??