Results 1 to 5 of 5

Thread: [RESOLVED] [2.0] XSL Extension object returning HTML problem

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Resolved [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?

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [2.0] XSL Extension object returning HTML problem

    Have you tried xsl:copy-of instead of xsl:value-of?

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  4. #4

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2.0] XSL Extension object returning HTML problem

    Done. Would you like a perm as well?

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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
  •  



Click Here to Expand Forum to Full Width