title: .net 4 xslt transformation Extension Function broken
body: <p>I'm in the process of upgrading an asp.net v3.5 web app. to v4 and I'm facing some problems with XSLT transformations I use on XmlDataSource objects.</p>
  
  <p>Part of a XSLT file:</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HttpUtility="ds:HttpUtility"&gt;
    &lt;xsl:output method="xml" indent="yes" encoding="utf-8"/&gt;
    &lt;xsl:template match="/Menus"&gt;
      &lt;MenuItems&gt;
        &lt;xsl:call-template name="MenuListing" /&gt;
      &lt;/MenuItems&gt;
    &lt;/xsl:template&gt;
  
    &lt;xsl:template name="MenuListing"&gt;
      &lt;xsl:apply-templates select="Menu" /&gt;
    &lt;/xsl:template&gt;
  
    &lt;xsl:template match="Menu"&gt;
        &lt;MenuItem&gt;
          &lt;xsl:attribute name="Text"&gt;
            &lt;xsl:value-of select="HttpUtility:HtmlEncode(MenuTitle)"/&gt;
          &lt;/xsl:attribute&gt;
          &lt;xsl:attribute name="ToolTip"&gt;
            &lt;xsl:value-of select="MenuTitle"/&gt;
          &lt;/xsl:attribute&gt;
        &lt;/MenuItem&gt;
    &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The problem seems to be in the line</p>
  
  <pre><code>&lt;xsl:value-of select="HttpUtility:HtmlEncode(MenuTitle)"/&gt;
  </code></pre>
  
  <p>Removing this and replacing it with a normal text, it will work. The way I setup the XML datasource:</p>
  
  <pre><code>    xmlDataSource.TransformArgumentList.AddExtensionObject("ds:HttpUtility", new System.Web.HttpUtility());
      xmlDataSource.Data = Cache.FetchPageMenu();
  </code></pre>
  
  <p>I've been searching the Microsoft pages for any changes in v4, but can't find any. All this worked fine in v3.5 (and before v2). Not receiving any errors, the data is just not displaying.</p>