[pdftex] PassiveTeX

Rolf Dieterich Rolf.Dieterich at gmx.de
Sat Mar 15 12:13:03 CET 2003


Hi Giuseppe,

in my case, the FO processor would have to produce an XSL stylesheet,
something like

   \begin{tabular}[t]{p{4cm}p{5.5cm}p{5.5cm}}%
     <xsl:for-each select="Customers/Customer">
       <xsl:choose>
         <xsl:when test="@VIP">
           \emph{<xsl:value-of select="LastName"/>} &amp;%
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="LastName"/> &amp;%
         </xsl:otherwise>
       </xsl:choose>
       <xsl:value-of select="MiddleInitial"/> &amp;%
       <xsl:value-of select="FirstName"/> \\%
     </xsl:for-each>
   \end{tabular}
   Total VIPs: <xsl:value-of select="count(Customers/Customer[@VIP])"/>

not only a .tex file like

   \begin{tabular}[t]{p{4cm}p{5.5cm}p{5.5cm}}%
     Smith & & Granny\\
     \emph{Ewing} & R. & J.\\
   \end{tabular}
   Total VIPs: 1

because there are still substitutions which have to be done during runtime.
So do all my xsl-statements in the .fo file have to be escaped in some way or
is it possible that the FO processor doesn't touch the xsl namespace at all?

Concerning the TeX parser, performance wouldn't be that important in my case
because the FO processing isn't done during runtime. But I ask myself if a
FO processor which produces TeX code has to (should) heavily rely on xmltex.
Sure, thus it's neatly integrated within the TDS structure. On the other hand,
you don't have the flexibility in using the XML parser of your choice and
you have to have a TeX system installed on every machine on which you do the FO
processing.

I have no idea, it's all still brainstorming, but I wonder if it wouldn't be
possible to implement the FO processing as a pure XSL transformation (with
an XSL stylesheet, like it can be done with producing HTML code). Of course,
in this case you would need an XSL processor but this isn't a big restriction
these days (in the case of distributing it within TeXLive, it would typically
be under the bin directory). Or a FO processor based on SAX or expat could
be possible.

On IBM alphaworks there is TeXML which consists of a DTD and a Java program
which produces TeX code from an XML document which conforms to this DTD. At
first glance, it seemed unnecessary to me to use another document style. But
for my workflow it could make sense to use it (or to develop another?) instead
of complex XSL-FO. I should look at this DTD more precisely. Of course,
TeXML shouldn't resemble the TeX grammar too much (because what would be the
benefit of TeX just expressed in similar XML terms?), and the TeXML documents
should be relatively easy to produce (eg. from .fo?). Or should the TeXML-DTD be
the leading format like DocBook --> XSL-FO --> ...?

So probably I have to do a lot more research. I guess there isn't a straight
solution yet. But it starts getting off-topic on this ML. The only excusion
I have is that at the end of all I want to produce PDF with pdfTeX -;

Ciao,
Rolf

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!



More information about the pdftex mailing list