[RESOLVED] [2.0] XSL Extension object returning HTML problem
I am performing an XSL transformation in my code and am also having it refer to an extension object with lots of methods I need.
It all works, except for one method. The method, GetHeader() returns a bit of HTML, but I've noticed that it is not being treated the same as the rest of the HTML in the transformation. To give you an idea,
Code:
//My extension class
public string GetHeader()
{
return "<h1>TEST</h1>";
}
And it is referred to from the XSL as:
Code:
<xsl:value-of select="UtilityFunctions:GetHeader()"/>
The problem is, the string from GetHeader() is rendered exactly as it is on the page. So instead of seeing TEST in large letters, I see <h1>TEST</h1>.
I even tried using html entities instead of the brackets, but those get rendered straight to the page as well.
I then tried having the method return an XmlDocument object and then an XmlNode object containing the XHTML shown above, but then all that is rendered is the innertext.
What am I missing?
Re: [2.0] XSL Extension object returning HTML problem
Have you tried xsl:copy-of instead of xsl:value-of?
Re: [2.0] XSL Extension object returning HTML problem
I have not. I shall try that now. If it works, I will fly down to Sunny Adelaide and give you a free haircut.
Re: [2.0] XSL Extension object returning HTML problem
Done. Would you like a perm as well?
Re: [RESOLVED] [2.0] XSL Extension object returning HTML problem
Not just now, but a wax would work.