ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Christopher Creutzig <christopher@creutzig.de>
Subject: Re: DOC/RTF to ConTeXt via XML
Date: Wed, 28 Sep 2005 10:02:03 +0200	[thread overview]
Message-ID: <433A4DFB.2040405@creutzig.de> (raw)
In-Reply-To: <4372F02C@webmail.colostate.edu>

Idris Samawi Hamid wrote:
> Ok, you guys have lost me now-) Maybe the best thing to do is try something 

 Just ignore the detail of what xslt can and can't do for the moment.
That just influences the choice of tools for one particular step and we
all agree that there are tools for this step.

> it to ConTeXt. From what I gather so far the process goes something like
> 
> doc  => rtf 
> rtf  => OO.o
> OO.o => xml

 No need for rtf.  That would loose lots of information anyway, wouldn't it?

> \startHans
> converting open office xml is not always easy; stay away from tab's and use 
> high level constructs as much as possible
> \stopHans

 I'm not really sure what Hand meant by this.  I assume he does have a
valid point, since so far I only had a short and theoretical look at the
format, but I can only guess what it is.  Hans, could you give an
example or two?

>>From this discussion it seems that I (as an xml ignoramous) would be better 
> off converting to ConTeXt code rather than processing pure xml blocks (but 
> maybe I'm wrong).

 XML is much, much easier to parse than just about anything else.  That
means that whatever your conversion process uses, you can simply reuse
an XML parser in whatever language you want to use.  (Interpreting the
file may be easy or hard, depending on the xml structure at hand.)  The
only exception I can see right now would be a rather large and
error-prone “Visual” Basic program to create a sort of export filter for
Word to write ConTeXt.  I certainly don't think that's easier.

> Once I get a sane xml file (this seems to be the biggest problem) what is the 
> best tool to convert this to ConTeXt?

 It depends on who is going to write the conversion.  From the languages
I've used so far, it's probably easiest to do in xslt, but if you
are/have at hand a programmer who's good at ruby but would have to learn
xslt first, the whole thing may not be big enough to warrant learning
another language first.  Unless that programmer wants to, which would be
a very good sign.  Learning a new language per year is not really a bad
idea.

> We are all extremely busy, of course, but if anyone finds this interesting I 
> can send a sample doc article from my journal. Maybe we can do a MyWay or 
> something to document this process for ourselves and others, as well as find 

 It might be a pretty specific thing, though.  My guess is that you
could make more progress by thinking about what sort of structurals you
would like to have, rather than looking at what you have right now.


Christopher

  reply	other threads:[~2005-09-28  8:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-27 14:50 Idris Samawi Hamid
2005-09-28  8:02 ` Christopher Creutzig [this message]
     [not found] <20050928080211.5A0EB127F8@ronja.ntg.nl>
2005-09-28  8:54 ` Duncan Hothersall
2005-09-28 11:45   ` Christopher Creutzig
  -- strict thread matches above, loose matches on Subject: below --
2005-09-27 15:10 Idris Samawi Hamid
2005-09-27 15:19 ` Adam Lindsay
2005-09-28  7:08 ` Christopher Creutzig
     [not found] <20050927100004.7F435127E5@ronja.ntg.nl>
2005-09-27 10:24 ` Duncan Hothersall
2005-09-27 13:42   ` Christopher Creutzig
     [not found] <20050927074229.9EF85127E2@ronja.ntg.nl>
2005-09-27  8:05 ` Duncan Hothersall
2005-09-27  9:03   ` Christopher Creutzig

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

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

  git send-email \
    --in-reply-to=433A4DFB.2040405@creutzig.de \
    --to=christopher@creutzig.de \
    --cc=ntg-context@ntg.nl \
    /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.
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 NNTP newsgroup(s).