Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mocha_Sln 2 posts 20 karma points
    Feb 01, 2009 @ 00:45
    Mocha_Sln
    0

    How do I display output of xslt as HTML?

    Hi guys,

    Here I have a very simple xslt:


    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml
    umbraco.library">








    Where the "$flang" is the language code. However, what I get on my website is this:
    "

    Testing content

    second line

    " instead of
    "TestingC content
    second line"

    (FYI, this is a macro used to switch which of the language corresponding content to display following this guide. http://www.umbraco.org/documentation/books/multilingual-11-sites. I have problem figuring out in which of the step is altered to accomodate for the language selection. So I thought I'd just change it with xslt).

    Any help is greatly appreciated.

    Thanks in advance.

  • Dirk De Grave 4539 posts 6017 karma points MVP 3x admin c-trib
    Feb 01, 2009 @ 01:25
    Dirk De Grave
    0

    Hi,

    Have a look at the possible attributes for xsl:value-of... you need to disable output escaping as in:

    [code][/code]

    A nice help op the xslt statement can be found at http://www.w3schools.com/xsl/el_value-of.asp

    Regards,
    /Dirk

  • Mocha_Sln 2 posts 20 karma points
    Feb 01, 2009 @ 10:41
    Mocha_Sln
    0

    Hi Dirk, thanks for the quick reply.

    I now however have a different problem as I tried to add macros to rich text field "bodyText" in the previous example, the macro doesn't work. It only renders in the cms back end.

    Is it supposed to be like that?

    Or am I suppose to extract the field text from the node by some other way?

  • Kenneth Solberg 227 posts 418 karma points
    Feb 01, 2009 @ 16:12
    Kenneth Solberg
    0

    Have a look at umbraco.library:RenderMacroContent.

Please Sign in or register to post replies

Write your reply to:

Draft