Sorry, I can't help you directly with your problem. Two ideas:
1. Modify Magritte so that you can specify the id manually. Again
this could potentially lead to duplicated IDs on a single page, if
you use the same description multiple times.
2. Use a different testing framework. Albatross is well known to work
with Magritte (and Pier) and has been used for several scenarios.
Have a look at:
http://www.iam.unibe.ch/~scg/Archive/Projects/
Brue06a.pdf (Chapter 2). It uses a fuzzy JavaScript search (similar
to your Xpath idea) to identify the form-element using its label.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch