ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Duncan Hothersall <dh@capdm.com>
Subject: Re: DOC/RTF to ConTeXt via XML
Date: Tue, 27 Sep 2005 09:05:43 +0100	[thread overview]
Message-ID: <4338FD57.3040109@capdm.com> (raw)
In-Reply-To: <20050927074229.9EF85127E2@ronja.ntg.nl>

> Question: Is it possible to design a doc or rtf template that Open Office can 
> convert to a sane, consistent xml format? 

OpenOffice.org does allow you to attach an XSLT stylesheet to an export
process which therefore allows you to do a (limited) transformation from
the visual markup which is its native format to a more structured one
which you would need. But the biggest challenge is that all
wordprocessors are designed for visual editing, meaning that there are,
for example, 15 or so different ways to get a bulleted list in Word,
creating 15 or so different RTF constructs, and coping with this can be
a nightmare.

> If the Tremblay approach is rich 
> enough, that would solve a lot of problems! Here is my idea:
> 
> 1. Give each author a doc/rtf template for formatting their article;
> 2. Use OpenOffice to convert to xml;
> 3. Use the Tremblay method (have not tried it yet) to process this in Context.

The FO approach (Paul Tremblay's focus) is one way to process XML to
paginated output, but there are many others. Personally I don't like the
FO approach, for a variety of reasons, but I'm sure others have had
success with it. But you should also explore DocBook-in-ConTeXt, which
uses ConTeXt's native XML processing capabilities. And don't rule out
using a separate scripting language to convert XML into ConTeXt as a
batch process, since that will give you the ultimate flexibility in
accessing all of ConTeXt's abilities.

> Question: Does the entire journal have to be in programmed in xml or can 
> ConTeXt process xml locally? For example, I may have my own article done in 
> COnTeXt mixed with other articles done in rtf=>xml.

You can just put XML into \startXMLdata ... \stopXMLdata blocks. I do
this for MathML processing within a larger ConTeXt document.

> Any other advice (and/or pitfalls to watch for) would be appreciated. This 
> sounds very promising!

Horses for courses. It's possible to get sucked into things like an FO
implementation or an XML conversion and find that you have spent months
perfecting it and it only shaves half an hour off your production time!
Also, you do tend to have to make compromises in design if you want to
be able to process directly from XML. But if you have sufficient
throughput and an appropriate design, it can be a real boon.

Hope that helps.

Duncan

       reply	other threads:[~2005-09-27  8:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050927074229.9EF85127E2@ronja.ntg.nl>
2005-09-27  8:05 ` Duncan Hothersall [this message]
2005-09-27  9:03   ` Christopher Creutzig
     [not found] <20050927100004.7F435127E5@ronja.ntg.nl>
2005-09-27 10:24 ` Duncan Hothersall
2005-09-27 13:42   ` Christopher Creutzig
2005-09-27 14:50 Idris Samawi Hamid
2005-09-28  8:02 ` Christopher Creutzig
2005-09-27 15:10 Idris Samawi Hamid
2005-09-27 15:19 ` Adam Lindsay
2005-09-28  7:08 ` Christopher Creutzig
     [not found] <20050928080211.5A0EB127F8@ronja.ntg.nl>
2005-09-28  8:54 ` Duncan Hothersall
2005-09-28 11:45   ` 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=4338FD57.3040109@capdm.com \
    --to=dh@capdm.com \
    --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).