|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Converting HTML to plain text
Radha,
Being able to constrain your incoming HTML will be a big help. Given that, I think the easiest approach long-term will be a stylesheet or chain of stylesheets that create plain text from your HTML. The reason I say "chain of stylesheets" is that I think you'll find some problems, like rendering those tables, will be most tractable with multiple passes. If it were me, I'd start with a two-pass approach. Leave aside XSL-FO: it specifies layout for formatted pages, and isn't designed to reflect the constraints of plain text. In my first pass, I'd render into plain text all information that has to be rendered in line, such as mapping <i>...</i> to *...* or whatever plain-text markup convention you decide. A second pass (or passes) would take care of line breaks, indents and so forth. Even so I dare say you'll find that table layout is not trivial. Other programmers have used Java to help with the trickier parts of this, which you should consider. An excellent article appears at http://www-106.ibm.com/developerworks/java/library/x-xmlist1/. Even if you can't use these exact tools, the architecture described is sound. Good luck, Wendell At 01:25 PM 6/22/2004, you wrote: Hi Wendell, ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
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
|

Cart








