[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Formatting XML as ascii Text
- From: Mike Sokolov <sokolov@ifactory.com>
- To: "David A. Lee" <dlee@calldei.com>
- Date: Thu, 12 Nov 2009 08:23:55 -0500
That's an interesting problem: I'm confused about the wrapping
requirement though. Do you need to wrap at a given number of characters
(sounded like 40?) or a pixel (or inch) width? Your comment about the
variable-width font makes it sound like you are printing or displaying
on screen with a particular font. It's obviously much simpler if you
don't have to worry about fonts, variable character widths, vagaries of
printer drivers and the like.
-Mike
David A. Lee wrote:
> I have a project where I need to take XML and format it as ascii text.
> Sounds simple right ? But alas the requirements are subtle. It seems
> people dont do text formatting much anymore.
> I fondly remember the days of nroff where I could do good text
> formatting and achieve things like word splitting (hyphenating),
> justification etc on text content. In particular a challenge is to
> support multi column tables. Thats right, text spanning 5 columns,
> that needs to wrap in each column. Oh and do that with 40 column
> line widths. Piece of cake.
> Oh and its a Variable width text font ... ha !
>
> What I tried so far which almost works sorta, just enough to not work
> well enough :)
> Translate the XML to HTML with XSLT then I downloaded one of the free
> "HTML to Text" tools which are prevalent on the net.
> It sorta did work, except for the tables. But I need something that
> can work in a production environment. Open Source is prefered,
> but if it does an excellent job then a commercial product could be
> justified (pun intended).
>
> My next attempt will to try Apache FOP. I looked at RenderX but
> they dont claim text output.
> Apache FOP claims a text output but with caveots, the claim is its not
> robust code with poor results.
> Maybe they are being kind and it really works great. I will try.
>
> Any other suggestions ? I can always 'roll my own' but this project
> is not on the budget yet and were trying to see if we can do something
> with minimal work.
> Appreciated,
>
> thanks,
>
>
>
>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]