+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Saving xml and xslt into the cms

Saving xml and xslt into the cms

2 posts, 0 answered
  1. Stuart
    Stuart avatar
    4 posts
    Registered:
    25 Jan 2011
    26 Jan 2011
    Link to this post
    Hi, 

    I have created a content based module called email templates. I want to store xslt and xml content into the CMS.  I am using the telerik:RadEditor file to import the xslt/xml (see attachment). The only problem is that when ever I and save xslt or xml in the database it removes or changes the xml specific tags. Below are some examples. How I can save xml / xslt in the cms database.

    e.g. 
    <?xml version="1.0"?> <-- Gets removed
    <hello-world>
        <greeter>An XSLT Programmer</greeter>
        <greeting>Hello, World!</greeting>
    </hello-world>

    or with stylesheets

    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://NCT.Schemas.EmailServiceMessage">
        <xsl:output method="html" indent="yes" encoding="utf-8"/> <-- Gets Changed
        <xsl:include href="ServerRoot.xsl"/> <-- Gets Changed
        <xsl:include href="CoreTemplatesHtml.xsl"/>
        <xsl:include href="OrderTemplatesHtml.xsl"/>
        <xsl:template match="ns0:EmailServiceMessage">
            <html>
                <head>
                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
                </head>

    Gets changed to 

    <html>
        <head>
        </head>
        <body>
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://NCT.Schemas.EmailServiceMessage"> <xsl:output method="html" indent="yes" encoding="utf-8"> <xsl:include href="ServerRoot.xsl"> <xsl:include href="CoreTemplatesHtml.xsl"> <xsl:include href="OrderTemplatesHtml.xsl"> <xsl:template match="ns0:EmailServiceMessage">
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <xsl:call-template name="CssTemplate"> <!--Container table-->
            <table border="0" width="85%" valign="top" align="center" cellpadding="5" cellspacing="0" style="background-color: #ffffff;">
                <!--Header-->
                <tbody>
                    <tr>
                        <td> <xsl:call-template name="HeaderTemplate"> </xsl:call-template></td>
                    </tr>
                    <!--Main content-->

    Thanks
    Stuart Davies




  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    31 Jan 2011
    Link to this post
    Hello Stuart,

    The problem is that you cannot enter XML to an IEditableIframe. So, if you want to keep use the RadEditor control you can use custom tags for that will replace these one that are stripped.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered