[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: a simple RTF <> XML question
slacker hacker wrote:
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|