I have tried and tried to do the exact thing that you are having problems with, and I have never been able to get it to work properly. i have called Quark and they have been no help and all. The XML features in Quark are very buggy and i hope they fix them soon!
Sorry I can't help, if you figure it out please let me know!