From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: [PATCH] export to various flavors of (X)HTML Date: Fri, 19 Apr 2013 17:57:46 +0800 Message-ID: <878v4elu5h.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT7z7-0003or-SG for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 05:52:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UT7z4-0002Zv-5r for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 05:52:01 -0400 Received: from plane.gmane.org ([80.91.229.3]:38072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT7z3-0002Yr-MJ for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 05:51:58 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UT7z1-0005dQ-Ht for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 11:51:55 +0200 Received: from 114.250.107.235 ([114.250.107.235]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Apr 2013 11:51:55 +0200 Received: from eric by 114.250.107.235 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Apr 2013 11:51:55 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: rick@rickster.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit I'm starting a new thread for this since the previous discussion was buried in with something tangential. I've attached what I think is a working patch to allow ox-html to export to different flavors of (X)HTML. It works via `org-html-doctype': in addition to setting it to a doctype string directly, you can also set it to one of the following (defaults to xhtml-strict): html4-strict html4-transitional html4-frameset xhtml-strict xhtml-transitional xhtml-framset xhtml-11 html5 The doctype will be set correctly, and the HTML output will be adjusted to conform to the requirements of that doctype, with No Errors Whatsoeverâ„¢. The results validate, anyway... I'm not proud of some of the implementation (self-closing vs non-self-closing tags are ugly, and I wish org-html-html5-p and org-html-xhtml-p were variables, not functions), but there it is, it seems to work. If this is deemed okay I'll send a version of the patch with a proper commit message, and also updated documentation. And once that's done I've got another that builds on this, allowing you to use stuff like and