msgeturl.xsl

This is NOT a cross-browser solution, it results in an error for Firefox.
It only works for browsers like Internet Explorer supporting msxsl:script.
[The msxsl namespace is completely encapsulated, just do <xsl:include href="msgeturl.xsl" />as needed]

urldemo.xml?query (click to see result of transformation in IE) urldemo.xsl (example usage of extra:msgeturl())
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="urldemo.xsl"?>
<data/>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:extra="urn:extra-functions"
  extension-element-prefixes="extra"
>
  <xsl:output method="html" encoding="utf-8" />

  <xsl:include href="msgeturl.xsl" />

  <xsl:template match="/">
    <html>
      <body>
        <table border="1">
          <tr><td>name(*)</td><td><xsl:value-of select="name(*)" /></td></tr>
          <tr><td>url</td><td><xsl:value-of select="extra:msgeturl(.)" /></td></tr>
        </table>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
msgeturl.xsl (extra:msgeturl() as msxsl:script)
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  xmlns:extra="urn:extra-functions"
>
  <msxsl:script language="JScript" implements-prefix="extra">
    function msgeturl(nodelist) {
      return nodelist.nextNode().url;
    }
  </msxsl:script>

</xsl:stylesheet>