From mboxrd@z Thu Jan 1 00:00:00 1970 From: "T. V. Raman" Subject: patch to org.el to produce xhtml: Date: Thu, 25 May 2006 19:05:48 -0700 Message-ID: <17526.25212.48304.308344@localhost.localdomain> Reply-To: raman@users.sf.net Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ud2vpmnzpw" Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjRi4-0001Y8-Gs for emacs-orgmode@gnu.org; Thu, 25 May 2006 22:05:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjRi1-0001XY-Ui for emacs-orgmode@gnu.org; Thu, 25 May 2006 22:05:51 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjRi1-0001XQ-QD for emacs-orgmode@gnu.org; Thu, 25 May 2006 22:05:49 -0400 Received: from [63.240.77.81] (helo=sccrmhc11.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjRmo-0003Vt-Mv for emacs-orgmode@gnu.org; Thu, 25 May 2006 22:10:46 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --ud2vpmnzpw Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit I am attaching a partial patch (see below for explanation of partial) along with sample files, I hope others here can help finish this. Goal: Produce well-formed XHTML. What I have Fixed: 0) Ensure all tagnames are lower case. 1) Emit correct doctype and xhtml namespace. 2) Emit /> to close meta tags. 3) Emit to close bullets (not all cases covered) 4) Ensured that all attribute values are quoted. ToDo: A) Emit closing li tags in all cases. B) Emit closing

to close paragraphs. C) Ensure that author and date bits on the bottom are wrapped in a

...

where xxx is author or date as appropriate. I'm attaching a bullets.org file, and the final xhtml output I'd like to produce. *** org.el 2006/05/26 01:29:49 1.1 --- org.el 2006/05/26 01:57:39 *************** *** 12609,12634 **** ;; File header (insert (format ! " ! %s ! ! ! ! %s " ! language (org-html-expand title) (or charset "iso-8859-1") date time author style)) (insert (or (plist-get opt-plist :preamble) "")) (when (plist-get opt-plist :auto-preamble) ! (if title (insert (concat "

" ! (org-html-expand title) "

\n"))) ; (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) ; (if email (insert (concat "<" ; email ">\n"))) --- 12609,12636 ---- ;; File header (insert (format ! " ! ! %s ! ! ! ! %s " ! language language (org-html-expand title) (or charset "iso-8859-1") date time author style)) (insert (or (plist-get opt-plist :preamble) "")) (when (plist-get opt-plist :auto-preamble) ! (if title (insert (concat "

" ! (org-html-expand title) "

\n"))) ; (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) ; (if email (insert (concat "<" ; email ">\n"))) *************** *** 12639,12645 **** (if org-export-with-toc (progn ! (insert (format "

%s

\n" (nth 3 lang-words))) (insert "
    \n") (setq lines (mapcar '(lambda (line) --- 12641,12647 ---- (if org-export-with-toc (progn ! (insert (format "

    %s

    \n" (nth 3 lang-words))) (insert "
      \n") (setq lines (mapcar '(lambda (line) *************** *** 12694,12700 **** (insert (format (if todo ! "
    • %s\n" "
    • %s\n") head-count txt)) --- 12696,12702 ---- (insert (format (if todo ! "
    • %s
    • \n" "
    • %s\n") head-count txt)) *************** *** 13254,13260 **** (if (aref levels-open (1- level)) (insert "
    • " title "

      \n") (aset levels-open (1- level) t) ! (insert "

      • " title "

        \n"))) (if org-export-with-section-numbers (setq title (concat (org-section-number level) " " title))) (setq level (+ level 1)) --- 13256,13262 ---- (if (aref levels-open (1- level)) (insert "

      • " title "

        \n") (aset levels-open (1- level) t) ! (insert "

        • " title "
        • \n"))) (if org-export-with-section-numbers (setq title (concat (org-section-number level) " " title))) (setq level (+ level 1)) *************** *** 13272,13280 **** "") t t title))) (if with-toc ! (insert (format "\n%s\n" level head-count title level)) ! (insert (format "\n%s\n" level title level))))))) (defun org-html-level-close (&rest args) "Terminate one level in HTML export." --- 13274,13282 ---- "") t t title))) (if with-toc ! (insert (format "\n%s\n" level head-count title level)) ! (insert (format "\n%s\n" level title level))))))) (defun org-html-level-close (&rest args) "Terminate one level in HTML export." --ud2vpmnzpw Content-Type: application/octet-stream Content-Description: input org file Content-Disposition: attachment; filename="bullets.org" Content-Transfer-Encoding: base64 KiBIVE1MIEV4cG9ydC4KCnRoaXMgaXMgdG8gdGVzdCBIVE1MIGV4cG9ydCBhbmQgbW92ZSBvdXRw dXQgdG8gWEhUTUwuCgogIC0gQnVsbGV0ZWQgbGlzdC4KICAtIE1vcmUgYnVsbGV0cy4KCioqICBT dWJzZWN0aW9uIAoKICArIEFub3RoZXIgbGlzdC4KICArIE1vcmUgdGhpbmdzIHRvIGRvLgoKKioq IE51bWJlcmVkIExpc3RzOgoKICAxLiBGaXJzdCBpdGVtLgogIDIuIFNlY29uZCBpdGVtLgogIDMu IFRoaXJkIGFuZCBsYXN0IGl0ZW0uCg== --ud2vpmnzpw Content-Type: text/html Content-Description: desired xhtml output Content-Disposition: inline; filename="wish-bullets.html" Content-Transfer-Encoding: 7bit bullets

          bullets

          Table of Contents

          1 HTML Export.

          this is to test HTML export and move output to XHTML.

          • Bulleted list.
          • More bullets.

          1.1 Subsection

          • Another list.
          • More things to do.

          1.1.1 Numbered Lists:

          1. First item.
          2. Second item.
          3. Third and last item.

          Author: TV Raman <raman@users.sf.net>


          Date: 2006/05/25 06:32:18 PM

          --ud2vpmnzpw Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --ud2vpmnzpw-- -- Best Regards, --raman Email: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: patch to org.el to produce xhtml: Date: Sat, 27 May 2006 14:37:17 +0200 Message-ID: References: <17526.25212.48304.308344@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fjy2l-0006KV-3G for emacs-orgmode@gnu.org; Sat, 27 May 2006 08:37:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fjy2j-0006K3-Ll for emacs-orgmode@gnu.org; Sat, 27 May 2006 08:37:22 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fjy2j-0006K0-J9 for emacs-orgmode@gnu.org; Sat, 27 May 2006 08:37:21 -0400 Received: from [194.134.35.145] (helo=smtp05.wanadoo.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fjy7q-0007fg-LP for emacs-orgmode@gnu.org; Sat, 27 May 2006 08:42:38 -0400 In-Reply-To: <17526.25212.48304.308344@localhost.localdomain> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: raman@users.sf.net Cc: emacs-orgmode@gnu.org On May 26, 2006, at 4:05, T. V. Raman wrote: > I am attaching a partial patch (see below for explanation of > partial) > along with sample files, I hope others here can help finish > this. > > Goal: Produce well-formed XHTML. > > What I have Fixed: > > 0) Ensure all tagnames are lower case. > 1) Emit correct doctype and xhtml namespace. > 2) Emit /> to close meta tags. > 3) Emit to close bullets (not all cases covered) > 4) Ensured that all attribute values are quoted. > > ToDo: > > A) Emit closing li tags in all cases. > B) Emit closing

          to close paragraphs. > C) Ensure that author and date bits on the bottom are wrapped in > a

          ...

          > where xxx is author or date as appropriate. > I think I can take care of these remaining issues. This is all that is needed to get to XHTM strict???? Easier than I thought, then. Thanks! Carsten From mboxrd@z Thu Jan 1 00:00:00 1970 From: "T. V. Raman" Subject: Re: patch to org.el to produce xhtml: Date: Sat, 27 May 2006 12:22:34 -0700 Message-ID: <17528.42746.692093.879637@localhost.localdomain> References: <17526.25212.48304.308344@localhost.localdomain> Reply-To: raman@users.sf.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fk4Mx-0002WJ-Vv for emacs-orgmode@gnu.org; Sat, 27 May 2006 15:22:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fk4Mu-0002Vw-OU for emacs-orgmode@gnu.org; Sat, 27 May 2006 15:22:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fk4Mu-0002Vo-IZ for emacs-orgmode@gnu.org; Sat, 27 May 2006 15:22:36 -0400 Received: from [216.148.227.154] (helo=rwcrmhc14.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fk4S5-0005RX-MN for emacs-orgmode@gnu.org; Sat, 27 May 2006 15:27:57 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: dominik@science.uva.nl Cc: emacs-orgmode@gnu.org yes, I believe we will be mostly there. I still need to see what we output for tables. >>>>> "Carsten" == Carsten Dominik writes: Carsten> On May 26, 2006, at 4:05, T. V. Raman wrote: Carsten> >> I am attaching a partial patch (see below for explanation >> of partial) along with sample files, I hope others here >> can help finish this. >> >> Goal: Produce well-formed XHTML. >> >> What I have Fixed: >> >> 0) Ensure all tagnames are lower case. 1) Emit correct >> doctype and xhtml namespace. 2) Emit /> to close meta >> tags. 3) Emit to close bullets (not all cases >> covered) 4) Ensured that all attribute values are quoted. >> >> ToDo: >> >> A) Emit closing li tags in all cases. B) Emit closing >>

          to close paragraphs. C) Ensure that author and date >> bits on the bottom are wrapped in a

          ...

          >> where xxx is author or date as appropriate. >> Carsten> I think I can take care of these remaining issues. This is all Carsten> that is needed to get to XHTM strict???? Easier Carsten> than I thought, then. Carsten> Carsten> Thanks! Carsten> Carsten> Carsten -- Best Regards, --raman Email: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs