xsl-list
[Top] [All Lists]

Re: XSL-FO versus PostScript

2003-02-26 17:46:34
Date: Thu, 27 Feb 2003 00:18:24 GMT
Message-Id: <200302270018(_dot_)AAA16856(_at_)e3000>
From: David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] XSL-FO versus PostScript



In fact, I think packages like
LaTeX were a major milestone in the development of semantic markup and
therefore in the lineage of XML.

True enough and still there's probably a lot more _documents_ as opposed
to database output marked up in latex than in XML. (I'm not sure I
approve of the fact that all references to TeX in this thread have been
in the past tense:-)

but to return to the original question in the subject line, it is
comparing apples and oranges. 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.

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:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>