XSLT
Using XSLT to generate RTF
15:49, 12 Jul 2001 UTC | Simon St.Laurent

Eric van der Vlist announced an RTFOutputHandler for the XT XSLT processor which allows XT to produce Rich Text Format (RTF) output.

Developers who want to create RTF can build a style sheet which produces an XML version of the RTF vocabulary, and then specify this output method to have it serialized as RTF rather than XML.

Although the serialization approach is quite simple, it has substantial implications:

"I think that its very simplicity should make it a powerful and flexible tool, especially since it comes (ala XSL-FO) after a XSLT transformation.... If the XML serialization of RTF happens to be a good idea, this output handler could be very easily turned into a SAX writer and a RTF parser could be developed to parse RTF documents into XML."

The use of a serialization method still requires developers to have an understanding of RTF to create documents:

"The good news is that you don't need to fight with the text output method any longer to generate RTF, the bad news is that you still need to know RTF to use this output method!"

This initial release also has some signficant whitespace and Unicode limitations.

Eric van der Vlist is an editor of xmlhack.

Related stories:

Re: Using XSLT to generate RTF (Evan - 11:55, 14 Jun 2002)

... if someone interested, there is a RTF Generator - but it uses its own language to create RTFs ... but it supports tables and images: http://paggard.dlight.ru/rtf_gen/

Re: Using XSLT to generate RTF (jabba - 07:22, 18 May 2002)

Cocoon allows a utility called JFOR (Java Formatting Object to Rtf) to be used with it. With it, you can take your xml and xsl-fo files and create either a PDF, or an RTF, or both. It says it is also to be included into FOP.

www.jfor.org

Re: Using XSLT to generate RTF (Eric van der Vlist - 08:58, 17 Jul 2001)

> This doesn't seem terribly useful. Wouldn't a better approach be to generate RTF from XSLFO, the way that FOP generates PDF?

This is a (small) piece of the puzzle that could be used to transform XSL-FO into RTF.

This output method could be used to serialize as RTF the results of a XSLT transformation or a Java class that would deal with the semantic of the transformation from XSL-FO.

Re: Using XSLT to generate RTF (Tim McCune - 17:24, 16 Jul 2001)

This doesn't seem terribly useful. Wouldn't a better approach be to generate RTF from XSLFO, the way that FOP generates PDF?

Re: Using XSLT to generate RTF (Bart Schuller - 14:47, 13 Jul 2001)

Have you looked at jxrtf? It's at http://oss.jway.lu/jxrtf.html and it looks a bit less low-level. It also includes the much needed feature of allowing you to include pictures inside the rtf (not just links to them).

  
xmlhack: developer news from the XML community

Front page | Search | Find XML jobs

Related categories
XSLT
Tools