emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
To: B Smith-Mannschott <bsmith.occs@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: suggestion: "native" orgmode XML export (and import?)
Date: Sun, 9 Aug 2009 16:14:39 +0200	[thread overview]
Message-ID: <4b11f87e0908090714u4df77408y851ed46551697e5b@mail.gmail.com> (raw)
In-Reply-To: <28c656e20908090619r3ee89747we76b6d540b68cf95@mail.gmail.com>

> Out of curiosity, how would you want to handle textual content? Pass
> it through unchanged with org's wiki-like markup in tact, or somehow
> xml-ified?:
>
> *foo* --> *foo*
> *foo* --> <strong>foo</strong>

Probably the latter, since converting XMLified content to wiki markup
(or any other form) is easy and does not require manual parsing, while
the other direction is harder.
But for a first version, just leaving the markup as text would be fine too.

What would help a lot is, if XML content could be imported as a subtree.
Then you could have "python plugins" that take a subtree (or an entire orgfile)
converted to XML, process it into updated XML, and then that updated
XML gets imported
back into org and replaces the original subtree.   This would make it
easy for users
to implement something like http://tinyurl.com/nskzs8 , and probably
other custom
functions.

On Sun, Aug 9, 2009 at 3:19 PM, B Smith-Mannschott<bsmith.occs@gmail.com> wrote:
> On Sat, Aug 8, 2009 at 22:25, Ilya Shlyakhter<ilya_shl@alum.mit.edu> wrote:
>>> In the meantime, it would be useful to describe what kind of XML output
>>> do you want, because "XML" does not really describe anything per se.
>>
>> I'm looking for XML output that would closely mirror the logical
>> structure of the org file, and that would contain all the information
>> in the orgfile (since it's easy to ignore the parts you don't need
>> during XML processing).  So, something like
>>
>> <orgfile>
>>   <entry>
>>      <headline>Tasks</headline>
>>      <body>Here are the tasks I need to do</body>
>>      <children>
>>          <entry>
>>             <headline>Buy bread</headline>
>>             <todo-status>DONE</todo-status>
>>             <tags><tag>food</tag><tag>errands</tag></tags>
>>             <properties>
>>                 <property><name>Importance</name><value>1</value></property>
>>
>> <property><name>Deadline</name><value><date><day>07</day><month>08</month><year>09</year></date></value></property>
>>             </properties>
>>           </entry>
>>        </children>
>>      </entry>
>>   </orgfile>
>>
>> The details of the XML schema can of course change.   But it should
>> let you process org file data without having to parse any elements of
>> the org file (ideally, even dates) -- it would all be parsed by
>> orgmode's native parsing code and put into XML elements.
>>
>> If there are questions about how to represent specific org elements in
>> XML I can try to write a more detailed spec.
>>
>
> Out of curiosity, how would you want to handle textual content? Pass
> it through unchanged with org's wiki-like markup in tact, or somehow
> xml-ified?:
>
> *foo* --> *foo*
> *foo* --> <strong>foo</strong>
>
> // Ben
>

  reply	other threads:[~2009-08-09 14:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06 14:54 suggestion: "native" orgmode XML export (and import?) Ilya Shlyakhter
     [not found] ` <1f38ae890908061457m7350ecfdw566e7ce9adc6f06e@mail.gmail.com>
2009-08-06 21:58   ` Andrew Stribblehill
     [not found]     ` <4b11f87e0908062305ue685293m633213469c47d0e8@mail.gmail.com>
2009-08-07  9:13       ` Andrew Stribblehill
2009-08-07  9:46         ` Ilya Shlyakhter
2009-08-07 11:44           ` David Bremner
2009-08-08  5:48           ` Bastien
2009-08-08 20:25             ` Ilya Shlyakhter
2009-08-09 13:19               ` B Smith-Mannschott
2009-08-09 14:14                 ` Ilya Shlyakhter [this message]
2009-08-09 17:00               ` Sebastian Rose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b11f87e0908090714u4df77408y851ed46551697e5b@mail.gmail.com \
    --to=ilya_shl@alum.mit.edu \
    --cc=bsmith.occs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).