Re: [O] DTD prohibited
On 2014-06-04 12:52, AW wrote: Am Mittwoch, 4. Juni 2014, 17:04:14 schrieb Eric Abrahamsen: Eric S Fraga writes: > On Tuesday, 3 Jun 2014 at 22:14, AW wrote: > > [...] > >> Hi, >> >> thank you, I started again digging into this strange thing and the >> culprit >> seems the first line of the html-file: >> >> >> Seems like simply exporting as html5 might solve the problem. Yes, it does, thank you. But the price is that tabulars lose the frames and lines. I did not invest whether due to export without those elements or because Word had issues with html5. It's because the html5 export has no default style for tables -- before opening in word, try opening the html in a browser, you will see that xhtml-strict export adds style info to the table element, but xhtml5 doesn't. If you want the same style in html5 as html4, try the following preamble in your org file: #+HTML_DOCTYPE: xhtml5 #+HTML_HEAD: #+HTML_HEAD: table { #+HTML_HEAD: border-top: thin solid gray; #+HTML_HEAD: border-bottom: thin solid gray; #+HTML_HEAD: } #+HTML_HEAD: thead {border-bottom: thin solid grey;} #+HTML_HEAD: td, th {padding: 6px;} #+HTML_HEAD: FYI, here's the table definition output in html4: and html5 rick
Re: [O] DTD prohibited
Am Mittwoch, 4. Juni 2014, 17:04:14 schrieb Eric Abrahamsen: > Eric S Fraga writes: > > On Tuesday, 3 Jun 2014 at 22:14, AW wrote: > > > > [...] > > > >> Hi, > >> > >> thank you, I started again digging into this strange thing and the > >> culprit > >> seems the first line of the html-file: > >> > >> > >> > >> If I remove this line, no error. And removing simply > > > > Have a look at > > > > ,[ C-h v org-html-xml-declaration RET ] > > > > | org-html-xml-declaration is a variable defined in `ox-html.el'. > > | Its value is > > | (("html" . "") > > | > > | ("php" . " > | ?>\"; ?>"))> | > > | Documentation: > > | The extension for exported HTML files. > > | %s will be replaced with the charset of the exported file. > > | This may be a string, or an alist with export extensions > > | and corresponding declarations. > > | > > | This declaration only applies when exporting to XHTML. > > | > > | You can customize this variable. > > | > > | [back] > > Seems like simply exporting as html5 might solve the problem. Yes, it does, thank you. But the price is that tabulars lose the frames and lines. I did not invest whether due to export without those elements or because Word had issues with html5. So I think I stick for the time being with customization of org-html-xml- declaration.
Re: [O] DTD prohibited
Eric S Fraga writes: > On Tuesday, 3 Jun 2014 at 22:14, AW wrote: > > [...] > >> Hi, >> >> thank you, I started again digging into this strange thing and the culprit >> seems the first line of the html-file: >> >> >> >> If I remove this line, no error. And removing simply > > Have a look at > > ,[ C-h v org-html-xml-declaration RET ] > | org-html-xml-declaration is a variable defined in `ox-html.el'. > | Its value is > | (("html" . "") > | ("php" . "\"; > ?>")) > | > | > | Documentation: > | The extension for exported HTML files. > | %s will be replaced with the charset of the exported file. > | This may be a string, or an alist with export extensions > | and corresponding declarations. > | > | This declaration only applies when exporting to XHTML. > | > | You can customize this variable. > | > | [back] Seems like simply exporting as html5 might solve the problem.
Re: [O] DTD prohibited
On Tuesday, 3 Jun 2014 at 22:14, AW wrote: [...] > Hi, > > thank you, I started again digging into this strange thing and the culprit > seems the first line of the html-file: > > > > If I remove this line, no error. And removing simply Have a look at ,[ C-h v org-html-xml-declaration RET ] | org-html-xml-declaration is a variable defined in `ox-html.el'. | Its value is | (("html" . "") | ("php" . "\"; ?>")) | | | Documentation: | The extension for exported HTML files. | %s will be replaced with the charset of the exported file. | This may be a string, or an alist with export extensions | and corresponding declarations. | | This declaration only applies when exporting to XHTML. | | You can customize this variable. | | [back] ` -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.6-1133-ga5c863
Re: [O] DTD prohibited
Am Dienstag, 3. Juni 2014, 00:34:58 schrieb James Harkins: > Bastien gnu.org> writes: > > Hi Alexander, > > > > AW t-online.de> writes: > > > Now, Word no longer can open the html-documents produced by orgmode. The > > error > > > > message is (translated from German): "DTD prohibited". > > > > You may want to customize `org-html-doctype' but you probably need to > > digg further to know what DTD is prohibited exactly. > > Apparently, all of them: > > http://en.m.wikipedia.org/wiki/Document_Type_Definition > > Under "Security": > > ~~ > An XML DTD can be used to create a denial of service (DoS) attack by > defining nested entities that expand exponentially, or by sending the XML > parser to an external resource that never returns.[10] > > For this reason, .NET Framework provides a property that allows prohibiting > or skipping DTD parsing, [10] and recent versions of Microsoft Office > applications (Microsoft Office 2010 and higher) refuse to open XML files > that contain DTD declarations. > ~~ > > So, if org ODT export now depends on a DTD, then we'd have to say that we > don't support exported files that open in MS Word. > > hjh Hi, thank you, I started again digging into this strange thing and the culprit seems the first line of the html-file: If I remove this line, no error. And removing simply xml version="1.0" helped as well. Courious. Because of such behaviour I hate Word, but ... Source: http://stackoverflow.com/a/15816168 Regards, Alexander
Re: [O] DTD prohibited
Bastien gnu.org> writes: > > Hi Alexander, > > AW t-online.de> writes: > > > Now, Word no longer can open the html-documents produced by orgmode. The error > > message is (translated from German): "DTD prohibited". > > You may want to customize `org-html-doctype' but you probably need to > digg further to know what DTD is prohibited exactly. Apparently, all of them: http://en.m.wikipedia.org/wiki/Document_Type_Definition Under "Security": ~~ An XML DTD can be used to create a denial of service (DoS) attack by defining nested entities that expand exponentially, or by sending the XML parser to an external resource that never returns.[10] For this reason, .NET Framework provides a property that allows prohibiting or skipping DTD parsing, [10] and recent versions of Microsoft Office applications (Microsoft Office 2010 and higher) refuse to open XML files that contain DTD declarations. ~~ So, if org ODT export now depends on a DTD, then we'd have to say that we don't support exported files that open in MS Word. hjh
Re: [O] DTD prohibited
Hi Alexander, AW writes: > Now, Word no longer can open the html-documents produced by orgmode. The > error > message is (translated from German): "DTD prohibited". You may want to customize `org-html-doctype' but you probably need to digg further to know what DTD is prohibited exactly. HTH, -- Bastien
[O] DTD prohibited
Hi, I'm drafting documents with orgmode. Once in a while I have to export them to html and send them as an attachment to an email, telling the recipient to open the file with word. Now, Word no longer can open the html-documents produced by orgmode. The error message is (translated from German): "DTD prohibited". I tried on two PC, both times Word 2010, same result: error. Example of orgmode-file to be exported: * Export Bla bla bla Exporting to odt and opening with libre writer: no problem. If anybody got the same error and knows a solution, I' be thankfull, regards, Alexander