Thank you very much Gustaf. As always, you are absolutely right. I didn't think about the generated HTML code, but there was an span tag, as you suggested. This tag was making it impossible for XoWiki to get the right values.
At least I can understand a little bit more about XoTCL now. Thank you for your help again.