You haven't explained why the output you are getting (<a href=...">) is unsuitable. Is it because you don't want to link to sample.xml, but to some file sample.html obtained by transforming sample.xml? In that case it rather depends on how you are organizing the transformation - in advance at publication time, on demand server-side, or on-demand client side.
You'll find examples of how to handle all three in the Genealogy case study chapter of my book.
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference