Re: [xsl] XSL-FO versus PostScript

Subject: Re: [xsl] XSL-FO versus PostScript
From: Zack Brown <zbrown@xxxxxxxxxxxxxxx>
Date: Thu, 27 Feb 2003 06:27:40 -0800
On Wed, Feb 26, 2003 at 07:46:34PM -0500, Mulberry Technologies List Owner wrote:
> >It would be virtually impossible to write
> >reasonable postscript from XSLT, you need a typesetter.
> >
> >Even just printing a simple text string like "hello world"
> >needs the typesetter to be able to determine the position of every
> >character to specify it to postscript, and to know which characters in
> >the font correspond (after ligature processing) to strings of characters
> >in the input, to know all the kerns (fine spacing) to place between
> >each letters (these are specified in the font metric afm or tfm files,
> >so at the very least you'd have to have an xml version of the font
> >metrics so xslt can read them. (I just tried this with TeX and it
> >kerns between the w and o of world in its default font (cmr)).
> >
> >And that's just to print hello world, if you start to think about
> >writing a float placement and page breaking algorithm in either XSLT or
> >Postscript you'll see that neither is an ideal language for the job.

OK. This puts it in perspective. I can see now that XSL-FO is *much*
higher level than PostScript, and it would not be feasible to try to
"whip out" a set of XSLT recipes that handle the features we get with

Now, Take the hypothetical situation in which you could embed raw PostScript
in your XSL-FO documents. This hybrid between the two languages would not
force everyone to choose PostScript as their target output language, it
would only force the authors of FOP and other tools to incorporate PostScript
interpreters into their design.

If done properly, PostScript transformations could be performed by the
processor, to make text squiggly or have paragraphs loop around on the
page, while at the same time correctly handling kerning, page breaks,
footnotes, etc., within that very text.

Wouldn't that be very cool? If some thought were given to extending the
XSL-FO standard, it might be possible to give us the power, with a minimum
of butchery to either language.

It would be a lot of work for the FOP (and other) folks, because all
their algorithms would have to be redesigned to handle much more
complicated permutations. But maybe it would be worth it.

Be well,

> >
> >The output of a typesetting engine such as an XSLFO engine is often
> >postscript (or pdf) so clearly in some sense you can do anything in PS
> >that you could do in FO, but that is like saying why write in
> >a high level programming language when clearly it is more powerful
> >to write in assembler as anything in the former can be translated to the
> >latter.
> >
> >David
> >(LaTeX maintainer in a parallel life)
>  XSL-List info and archive:

Zack Brown

 XSL-List info and archive:

Current Thread