[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: a simple RTF <> XML question

Subject: Re: a simple RTF <> XML question
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 18 Oct 2006 09:45:21 +0200
simple rtf
slacker hacker wrote:

question 2 is: Given the simple nature of the transform needed, what tools (unix) should I be looking at?

Just some thoughts:


I don't believe it is "simple" or "trivial" at all. Take any RTF, to XML, back to RTF. Do you expect the output to be the same, apart from some texts/names/data? It might be better using a simple regex tool like sed or perl to do the transformation. But perhaps it is indeed easy, I don't know, to get XML from RTF.

The reverse, I believe, is much simpler. You are on the right track where you consider XSLFO. But there's a lot to learn. First XSLT (do you go with 2.0 or 1.0? I recommend 2.0) language. Then XSLFO. Then RTF again. Apache FOP is not yet up to grips with RTF, but it is oncoming. Other parsers, I don't know.

More likely would be, considering the whole scenario, to get XSLFO from RTF (xslfo is xml anyway, so this won't violate your first requirement, and it gives you a generalized way to keep the font etc data). Do your thing with it (but leave it intact as XSLFO, if possible). Now all you need is parse the resulting XSLFO into RTF back again. But be not surprised if the text layout will be off by a bit. Not sure there exists a readymade tool to get xslfo from rtf, though.

-- Abel Braaksma
  http://www.nuntia.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.