This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

a novice's question


Here's a novice's question:

From reading the XSL spec I got the idea that XSLT has a fairly complete set 
of programming features (conditions, loops, etc.) but is not concerned with 
any visual formatting issues. Now, that's logical. But on the other end of 
the rope there's XSL FO which offers a good inventory of formatting 
parameters, but has no programming abilities at all. This seems much less 
logical to me.

I'm a designer and I must say that visual formatting involves a lot of 
algorithmic elements - comparisons, calsulations, selections among 
alternatives, etc. Just one example: in a recent project I needed to format 
all the headings (in a huge document) in such a way that, first, a width 
measurement of the heading's text set in a certain font is taken, and 
second, depending on whether this width exceeds some specified constant, one 
of two formatting models for this heading is selected, with different 
indents, linebreaks, etc. In a static XSL FO description, these two heading 
models would be represented by sugnificantly different sub-trees.

Now, the above described problem cannot be solved in a XSLT stylesheet 
because XSLT has no idea of fonts and widths. And on the other hand, in XSL 
FO, I cannot express it either because there's no way there to program the 
necessary choice algorithm. Finally I was able to solve this problem 
satisfactorily using TeX, which allows to mix "control flow" and visual 
statements (although TeX is a nightmare in many other respects).

So, what XSL experts would say? Am I missing something? Or am I, with my 
designer needs, out of luck in XSL world?
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]