1

Closed

DTD is prohibited

description

I'm trying to customize the publish Web page for a ClickOnce application, in my opinion the XML module could do the job: http://todotnet.com/post/2005/10/11/Customize-the-Default-Web-Page-for-a-ClickOnce-Application.aspx
 
The default publish.htm file contains an undefined entity ( ) but that would not be a problem if only I could add a simple line to my xsl: <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
 
... Unfortunately, in ASP.NET 2.0 DTD is prohibited by default.
 
If you added a flag in the settings, allowing to set the ProhibitDtd property on XmlReaderSettings to false, that would be great!
Many thanks.
 

Message: DotNetNuke.Services.Exceptions.ModuleLoadException: XSLT compile error. ---> System.Xml.Xsl.XslLoadException: XSLT compile error. An error occurred at [...]\Portals\9\CustomPublish.xsl(0,0). ---> System.Xml.XmlException: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.Xsl.Xslt.XsltInput.ReadNextSiblingHelper() at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling() at System.Xml.Xsl.Xslt.XsltInput.MoveToNextSibling() at System.Xml.Xsl.Xslt.XsltInput.Start() at System.Xml.Xsl.Xslt.XsltLoader.LoadDocument() at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include) --- End of inner exception stack trace --- at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include) at System.Xml.Xsl.Xslt.XsltLoader.Load(Compiler compiler, Object stylesheet, XmlResolver xmlResolver) at System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil) at System.Xml.Xsl.XslCompiledTransform.CompileXsltToQil(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at System.Xml.Xsl.XslCompiledTransform.Load(String stylesheetUri) at DotNetNuke.Modules.XML.XmlController.GetXslTransform() at DotNetNuke.Modules.XML.XmlController.Render(TextWriter output) at DotNetNuke.Modules.XML.XmlModule.Render(HtmlTextWriter output) --- End of inner exception stack trace ---
Closed Mar 20, 2011 at 10:25 PM by SCullmann

comments

SCullmann wrote Mar 20, 2010 at 12:26 PM

Instead of using nbsp, you can use the numeric value  

wrote Mar 20, 2010 at 12:26 PM

titobrasolin wrote Mar 20, 2010 at 8:16 PM

You are right, but the source of the transformation might have been auto-generated by a tool, the default publish.htm file generated by Visual Studio is just an example. I could do an intermediate search-and-replace but allowing the DTD would be a more general solution in my opinion.

wrote Mar 21, 2010 at 9:24 PM

wrote Mar 20, 2011 at 10:22 AM

wrote Mar 20, 2011 at 10:25 PM

Resolved with changeset 58959.

wrote Feb 14, 2013 at 12:44 AM

wrote May 16, 2013 at 8:10 AM

wrote Jul 12, 2015 at 12:36 PM