|
-
Mar 13th, 2007, 08:28 AM
#1
[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?
-
Mar 13th, 2007, 08:35 AM
#2
Re: [2.0] XSL Extension object returning HTML problem
Have you tried xsl:copy-of instead of xsl:value-of?
-
Mar 13th, 2007, 10:06 AM
#3
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.
-
Mar 13th, 2007, 10:10 AM
#4
Re: [2.0] XSL Extension object returning HTML problem
Done. Would you like a perm as well?
-
Mar 13th, 2007, 10:14 AM
#5
Re: [RESOLVED] [2.0] XSL Extension object returning HTML problem
Not just now, but a wax would work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|