/// <summary>
        /// This method determines which output type to render
        /// </summary>
        /// <param name="xmlToRender">the xml string to render</param>
        /// <param name="xslTransformType"><see cref="XmlBrowser.XslTransformType"/></param>
        /// <returns>HTML string</returns>
        /// <seealso cref="XmlBrowser.XslTransformType"/>
        internal static string Render(XmlDocument xmlToRender, XmlBrowser.XslTransformType xslTransformType,XmlBrowser xmlBrowser)
        {
            if (xslTransformType == XmlBrowser.XslTransformType.XSL)
                return Render(xmlToRender.OuterXml);
            else if (xslTransformType == XmlBrowser.XslTransformType.XSLT10)
                return Render(xmlToRender, XmlRender.XmlToHtml10,false);
            else if (xslTransformType == XmlBrowser.XslTransformType.XSLT10RegExp)
                return Render(xmlToRender, XmlRender.XmlToHtml10Plus,false);
            else if (xslTransformType == XmlBrowser.XslTransformType.XSLT10Basic)
                return Render(xmlToRender, XmlRender.XmlToHtml10Basic,true);
            else if (xslTransformType == XmlBrowser.XslTransformType.XSLT10Cdata)
                return Render(xmlToRender, XmlRender.XmlToHtml10Cdata, false);

            return string.Empty;
        }
Exemple #2
0
        /// <summary>
        /// This method determines which output type to render
        /// </summary>
        /// <param name="xmlToRender">the xml string to render</param>
        /// <param name="xslTransformType"><see cref="XmlBrowser.XslTransformType"/></param>
        /// <returns>HTML string</returns>
        /// <seealso cref="XmlBrowser.XslTransformType"/>
        internal static string Render(XmlDocument xmlToRender, XmlBrowser.XslTransformType xslTransformType, XmlBrowser xmlBrowser)
        {
            if (xslTransformType == XmlBrowser.XslTransformType.XSL)
            {
                return(Render(xmlToRender.OuterXml));
            }
            else if (xslTransformType == XmlBrowser.XslTransformType.XSLT10)
            {
                return(Render(xmlToRender, XmlRender.XmlToHtml10, false));
            }
            else if (xslTransformType == XmlBrowser.XslTransformType.XSLT10RegExp)
            {
                return(Render(xmlToRender, XmlRender.XmlToHtml10Plus, false));
            }
            else if (xslTransformType == XmlBrowser.XslTransformType.XSLT10Basic)
            {
                return(Render(xmlToRender, XmlRender.XmlToHtml10Basic, true));
            }
            else if (xslTransformType == XmlBrowser.XslTransformType.XSLT10Cdata)
            {
                return(Render(xmlToRender, XmlRender.XmlToHtml10Cdata, false));
            }

            return(string.Empty);
        }