Firstly, NEVER use disable-output-escaping for this kind of job. It's an advanced facility to be used on very rare occasions, for example if you're dealing with input that has been double-escaped, but by using it here you're writing code that will only work in a restricted set of environments, for example it won't work on Firefox. It also means that the HTML serializer can't do it's stuff properlt for example by escaping URLs as required. In any case, it's ludicrously verbose. What you want is:
<a href="{@url}">
<xsl:value-of select="@name" />
</a>
Now to the point in hand. The chances are that your code doesn't work primarily because the initial context is wrong. You didn't show enough code to reveal what the initial context is, and this probably indicates that you haven't understood the importance of getting it right. A path expression will never select the right nodes if you start from the wrong place.
But also, the code I showed you used ancestor-or-self::menuitem. That's because the elements it's selecting are called menuitem. I've no idea why you changed it to ancestor-or-self::header_element. It sugegsts that you're guessing, and working by trial and error. which is not a good way of learning a new language. Find a book or online guide that suits your technical level, read it, and work through the exercises until you understand what's going on.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference